GHSA-fm35-jgg3-3grx: Pocketmine/pocketmine mp NaN/INF Vulnerability

HIGH
CVSS 7.5
CWE-20
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-fm35-jgg3-3grx
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-20: Improper Input Validation
Affected Product Pocketmine/pocketmine mp
Package Ecosystem Packagist
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (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.

pocketmine/pocketmine-mp fixed: 3.18.1
Upgrade pocketmine/pocketmine-mp to 3.18.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-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

### Impact A 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. - 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. - Clients may not be able to see other clients who have a NaN/INF rotation. - Clients may also crash in such cases. ### Patches A patch for this was included in the 3.18.1 release: https://github.com/pmmp/PocketMine-MP/commit/fb20bb38327b4c08ee3976640cd0dd547388a638 ### Workarounds Workarounds could be implemented as plugins using `DataPacketReceiveEvent` to block any inbound movement packets containing bogus values. ### For more information If you have any questions or comments about this advisory: - Open an issue in [pmmp/PocketMine-MP](https://github.com/pmmp/PocketMine-MP) - Email us at [team@pmmp.io](mailto:team@pmmp.io)

GHSA-fm35-jgg3-3grx Affected Pocketmine/pocketmine mp Versions

1 component(s)
Fixed Versions:
3.18.1
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?
GHSA-fm35-jgg3-3grx is a security vulnerability in Pocketmine/pocketmine mp involving NaN/INF in serverbound movement packets can crash clients and servers under CWE-20: Improper Input Validation.
Which Pocketmine/pocketmine mp versions are affected?
Affected versions include releases prior to 3.18.1 across affected packages: pocketmine/pocketmine-mp.
What version fixes GHSA-fm35-jgg3-3grx?
Upgrading to 3.18.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 3.18.1. Upgrade your dependency to 3.18.1 or later.
What is the CVSS score of GHSA-fm35-jgg3-3grx?
GHSA-fm35-jgg3-3grx has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-fm35-jgg3-3grx?
GHSA-fm35-jgg3-3grx is classified under CWE-20: Improper Input Validation (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.).
How can I check Packagist dependencies for GHSA-fm35-jgg3-3grx?
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-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
  }
}