GHSA-h6j3-j35f-v2x7: PocketMine-MP server crash with certain invalid JSON payloads in `LoginPacket` due to dependency vulnerability (3rd time)
7.5
CVSS Score
3.1
Basic Information
CVE ID
-
GHSA ID
EPSS Score
-
CWE
-
Published
3/6/2024
Updated
5/15/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| pocketmine/pocketmine-mp | composer | < 5.11.1 | 5.11.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from JsonMapper's ability to hydrate objects from scalar JSON values without proper validation. Key points:
- The JsonMapper::mapArray function lacked strict type checking for array elements (fixed in pmmp/netresearch-jsonmapper@b96a209)
- PocketMine's login handling code (ProcessLoginTask.php and LoginPacketHandler.php) used JsonMapper without enabling bStrictObjectTypeChecking prior to patching
- This combination allowed attackers to send scalar values where objects were expected, creating improperly initialized objects with missing @required properties that crashed when accessed
- The patch explicitly adds bStrictObjectTypeChecking=true in all affected mapping locations, confirming these were the vulnerable code paths