{"answers":{"affected":"2 open source packages ship an affected version, including pocketmine/bedrock-protocol.","exploited":"There is no known exploitation of GHSA-5jfw-35xp-5m42 in the wild and no public exploit code.","fix":"Upgrade pocketmine/bedrock-protocol to 8.0.2 or later.","what":"GHSA-5jfw-35xp-5m42 is a vulnerability in pocketmine/bedrock-protocol, published on 5 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-5jfw-35xp-5m42 and fix it if it is affected.\n\nWhat it is: GHSA-5jfw-35xp-5m42 is a vulnerability in pocketmine/bedrock-protocol, published on 5 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-5jfw-35xp-5m42 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- pocketmine/bedrock-protocol (Packagist): affected all versions; fixed in 8.0.2\n- pocketmine/bedrock-protocol (Packagist): affected all versions; fixed in 8.0.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-5jfw-35xp-5m42/ (Markdown: https://insights.sbomify.com/GHSA-5jfw-35xp-5m42/index.md)","id":"GHSA-5jfw-35xp-5m42","markdown":"https://insights.sbomify.com/GHSA-5jfw-35xp-5m42/index.md","name":"GHSA-5jfw-35xp-5m42","record":{"aliases":[],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Minecraft Bedrock server","requires_auth":"none","summary":"A malicious client can crash the PocketMine-MP server by sending a crafted login packet with a negative buffer length, causing an unhandled exception.","user_interaction":"not_required","vuln_class":"integer_overflow"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n`LoginPacket` uses `BinaryStream-\u003egetLInt()` to read the lengths of JSON payloads it wants to decode. Unfortunately, `BinaryStream-\u003egetLInt()` returns a signed integer, meaning that a malicious client can craft a packet with a large uint32 value for payload buffer size (which would be interpreted as a negative signed int32), causing `BinaryStream-\u003eget()` to throw an exception.\n\nIn the context of PocketMine-MP, this leads to a server crash when the vulnerability is exploited.\n\n### Patches\ne3fce7632b94e83fd6a518a87dcaf6a11681c4ac\n\n### Workarounds\nThis can be worked around by registering a custom `LoginPacket` implementation into `PacketPool` which overrides [this code](https://github.com/pmmp/BedrockProtocol/blob/47532c95ea37d5f0365b23f734d70d943ff95295/src/LoginPacket.php#L54) to patch it.\n\n### For more information\n* Email us at [team@pmmp.io](mailto:team@pmmp.io)","ecosystems":["Packagist"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Buffer length underflow in LoginPacket causing unchecked exceptions to be thrown","id":"GHSA-5jfw-35xp-5m42","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"integer_overflow","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Packagist","fixed":["8.0.2"],"introduced":["0"],"last_affected":[],"package":"pocketmine/bedrock-protocol","purl":null,"source":"GHSA-5jfw-35xp-5m42"},{"ecosystem":"Packagist","fixed":["8.0.2"],"introduced":["0"],"last_affected":[],"package":"pocketmine/bedrock-protocol","purl":"pkg:composer/pocketmine/bedrock-protocol","source":"GHSA-5jfw-35xp-5m42"}],"products":null,"published":"2022-04-05","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A malicious client can crash the PocketMine-MP server by sending a crafted login packet with a negative buffer length, causing an unhandled exception.","url":"https://insights.sbomify.com/GHSA-5jfw-35xp-5m42/"}