GHSA-fm35-jgg3-3grx: Pocketmine/pocketmine mp NaN/INF Vulnerability
HIGHGHSA-fm35-jgg3-3grx is a HIGH (CVSS 7.5) nan/inf vulnerability (CWE-20: Improper Input Validation) affecting Pocketmine/pocketmine mp libraries in the Packagist ecosystem. The issue involves nan/inf in serverbound movement packets can crash clients and servers. Remediation is available by upgrading affected packages to version 3.18.1.
GHSA-fm35-jgg3-3grx at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix GHSA-fm35-jgg3-3grx
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.
Upgrade pocketmine/pocketmine-mp to 3.18.1
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-fm35-jgg3-3grx, 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 3.18.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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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
GHSA-fm35-jgg3-3grx Affected Pocketmine/pocketmine mp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pocketmine/pocketmine-mp
|
Packagist |
< 3.18.1
|
3.18.1
|
References
Frequently Asked Questions
What is GHSA-fm35-jgg3-3grx?
Which Pocketmine/pocketmine mp versions are affected?
What version fixes GHSA-fm35-jgg3-3grx?
Is pocketmine/pocketmine-mp affected?
What is the CVSS score of GHSA-fm35-jgg3-3grx?
What CWE is associated with GHSA-fm35-jgg3-3grx?
How can I check Packagist dependencies for GHSA-fm35-jgg3-3grx?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fm35-jgg3-3grx",
"modified" : "2022-03-18T17:54:38Z",
"published" : "2022-03-18T17:54:38Z",
"aliases" : [ ],
"summary" : "NaN/INF in serverbound movement packets can crash clients and servers",
"details" : "### Impact\nA malicious client may send a `MovePlayerPacket` to the server whose position or rotation contains NaN or INF. Since neither the server nor vanilla client handles this properly, a number of interesting side effects come into play.\n\n- The server may crash in various ways if this exploit is used, because some mathematical operations on NaN/INF generate PHP warnings, which are converted into exceptions.\n- Clients may not be able to see other clients who have a NaN/INF rotation.\n- Clients may also crash in such cases.\n\n### Patches\nA patch for this was included in the 3.18.1 release: https://github.com/pmmp/PocketMine-MP/commit/fb20bb38327b4c08ee3976640cd0dd547388a638\n\n### Workarounds\nWorkarounds could be implemented as plugins using `DataPacketReceiveEvent` to block any inbound movement packets containing bogus values.\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n- Open an issue in [pmmp/PocketMine-MP](https://github.com/pmmp/PocketMine-MP)\n- Email us at [team@pmmp.io](mailto:team@pmmp.io)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "pocketmine/pocketmine-mp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.18.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.18.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pmmp/PocketMine-MP/security/advisories/GHSA-fm35-jgg3-3grx"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-21T18:18:08Z",
"nvd_published_at" : null
}
}