GHSA-wjfq-88q2-r34j: Pocketmine/pocketmine mp Unhandled Exception When Decoding Form Vulnerability

HIGH
CVSS 7.5
Published
Advisory Summary

GHSA-wjfq-88q2-r34j is a HIGH (CVSS 7.5) unhandled exception when decoding form vulnerability (General Security Weakness) affecting Pocketmine/pocketmine mp libraries in the Packagist ecosystem. The issue involves unhandled exception when decoding form response json. Remediation is available by upgrading affected packages to version 4.0.7.

GHSA-wjfq-88q2-r34j at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-wjfq-88q2-r34j
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification General Security Weakness
Affected Product Pocketmine/pocketmine mp
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix GHSA-wjfq-88q2-r34j

To remediate this vulnerability, upgrade all affected Pocketmine/pocketmine mp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pocketmine/pocketmine-mp fixed: 4.0.7
Upgrade pocketmine/pocketmine-mp to 4.0.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for pocketmine/pocketmine-mp

How to Check if You Are Affected

To determine whether your application is affected by GHSA-wjfq-88q2-r34j, inspect your project dependencies for Pocketmine/pocketmine mp:

inspect dependencies for pocketmine/pocketmine-mp

Analyze the terminal output to locate any version of Pocketmine/pocketmine mp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Pocketmine/pocketmine mp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact When handling form responses from the client (`ModalFormResponsePacket`), the Minecraft Windows client may send weird JSON that `json_decode()` can't understand. A workaround for this is implemented in `InGamePacketHandler::stupid_json_decode()`. An `InvalidArgumentException` is thrown by this function when it fails to fix an error found in the JSON, which is not caught by the caller. This leads to a server crash. ### Patches 56fe71d939c38fe14e18a31a673a9331bcc0e4ca ### Workarounds A plugin may handle `DataPacketReceiveEvent`, capture `ModalFormResponsePacket` and run the provided JSON through `stupid_json_decode`. Note that this requires copying the body of the function to a plugin, since the function is currently private. ### For more information If you have any questions or comments about this advisory: * Email us at [team@pmmp.io](mailto:team@pmmp.io)

GHSA-wjfq-88q2-r34j Affected Pocketmine/pocketmine mp Versions

1 component(s)
Fixed Versions:
4.0.7
Product / Package Ecosystem Affected Versions Fixed Version
pocketmine/pocketmine-mp
Packagist
≥ 4.0.0
< 4.0.7
4.0.7

References

Frequently Asked Questions

What is GHSA-wjfq-88q2-r34j?
GHSA-wjfq-88q2-r34j is a security vulnerability in Pocketmine/pocketmine mp involving Unhandled exception when decoding form response JSON under General Security Weakness.
Which Pocketmine/pocketmine mp versions are affected?
Affected versions include releases prior to 4.0.7 across affected packages: pocketmine/pocketmine-mp.
What version fixes GHSA-wjfq-88q2-r34j?
Upgrading to 4.0.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pocketmine/pocketmine-mp affected?
Yes, pocketmine/pocketmine-mp is affected in releases prior to 4.0.7. Upgrade your dependency to 4.0.7 or later.
What is the CVSS score of GHSA-wjfq-88q2-r34j?
GHSA-wjfq-88q2-r34j has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-wjfq-88q2-r34j?
GHSA-wjfq-88q2-r34j is classified under General Security Weakness.
How can I check Packagist dependencies for GHSA-wjfq-88q2-r34j?
Run the dependency tree command: 'inspect dependencies for pocketmine/pocketmine-mp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wjfq-88q2-r34j",
  "modified" : "2025-12-26T17:29:53Z",
  "published" : "2022-01-21T23:02:14Z",
  "aliases" : [ ],
  "summary" : "Unhandled exception when decoding form response JSON",
  "details" : "### Impact\nWhen handling form responses from the client (`ModalFormResponsePacket`), the Minecraft Windows client may send weird JSON that `json_decode()` can't understand. A workaround for this is implemented in `InGamePacketHandler::stupid_json_decode()`.\n\nAn `InvalidArgumentException` is thrown by this function when it fails to fix an error found in the JSON, which is not caught by the caller. This leads to a server crash.\n\n### Patches\n56fe71d939c38fe14e18a31a673a9331bcc0e4ca\n\n### Workarounds\nA plugin may handle `DataPacketReceiveEvent`, capture `ModalFormResponsePacket` and run the provided JSON through `stupid_json_decode`.\n\nNote that this requires copying the body of the function to a plugin, since the function is currently private.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [team@pmmp.io](mailto:team@pmmp.io)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "pocketmine/pocketmine-mp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.0.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pmmp/PocketMine-MP/security/advisories/GHSA-wjfq-88q2-r34j"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pmmp/PocketMine-MP/commit/56fe71d939c38fe14e18a31a673a9331bcc0e4ca"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pmmp/PocketMine-MP"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pmmp/PocketMine-MP/blob/4.0.7/changelogs/4.0.md#407"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-21T21:16:09Z",
    "nvd_published_at" : null
  }
}