GHSA-46c5-pfj8-fv65: Pocketmine/pocketmine mp Improperly Checked Metadata On Tools/armour Vulnerability

HIGH
CVSS 7.5
CWE-704
Published
Advisory Summary

GHSA-46c5-pfj8-fv65 is a HIGH (CVSS 7.5) improperly checked metadata on tools/armour vulnerability (CWE-704: Incorrect Type Conversion or Cast) affecting Pocketmine/pocketmine mp libraries in the Packagist ecosystem. The issue involves improperly checked metadata on tools/armour itemstacks received from the client. Remediation is available by upgrading affected packages to version 4.2.4.

GHSA-46c5-pfj8-fv65 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-46c5-pfj8-fv65
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-704: Incorrect Type Conversion or Cast
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-46c5-pfj8-fv65

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: 4.2.4
Upgrade pocketmine/pocketmine-mp to 4.2.4
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-46c5-pfj8-fv65, 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 4.2.4), 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-704: Incorrect Type Conversion or Cast, where the product does not correctly convert an object, resource, or structure from one type to a different type. 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 Due to a workaround applied in 1.13, an attacker may send a negative damage/meta value in a tool or armour item's NBT, which `TypeConverter` then blindly uses as if it was valid without being checked. When this invalid metadata value reaches `Durable->setDamage()`, an exception is thrown because the metadata is not within the expected range for damage values. This can be reproduced with either a too-large damage value, or a negative one. ### Patches c8e1cfcbee4945fd4b63d2a7e96025c59744d4f1 ### Workarounds In theory this can be checked by plugins using a custom `TypeConverter`, but this is likely to be very cumbersome. ### For more information * Email us at [team@pmmp.io](mailto:team@pmmp.io)

GHSA-46c5-pfj8-fv65 Affected Pocketmine/pocketmine mp Versions

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

References

Frequently Asked Questions

What is GHSA-46c5-pfj8-fv65?
GHSA-46c5-pfj8-fv65 is a security vulnerability in Pocketmine/pocketmine mp involving Improperly checked metadata on tools/armour itemstacks received from the client under CWE-704: Incorrect Type Conversion or Cast.
Which Pocketmine/pocketmine mp versions are affected?
Affected versions include releases prior to 4.2.4 across affected packages: pocketmine/pocketmine-mp.
What version fixes GHSA-46c5-pfj8-fv65?
Upgrading to 4.2.4 (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 4.2.4. Upgrade your dependency to 4.2.4 or later.
What is the CVSS score of GHSA-46c5-pfj8-fv65?
GHSA-46c5-pfj8-fv65 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-46c5-pfj8-fv65?
GHSA-46c5-pfj8-fv65 is classified under CWE-704: Incorrect Type Conversion or Cast (The product does not correctly convert an object, resource, or structure from one type to a different type.).
How can I check Packagist dependencies for GHSA-46c5-pfj8-fv65?
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-46c5-pfj8-fv65",
  "modified" : "2025-12-26T17:29:39Z",
  "published" : "2022-03-18T22:36:03Z",
  "aliases" : [ ],
  "summary" : "Improperly checked metadata on tools/armour itemstacks received from the client",
  "details" : "### Impact\nDue to a workaround applied in 1.13, an attacker may send a negative damage/meta value in a tool or armour item's NBT, which `TypeConverter` then blindly uses as if it was valid without being checked.\n\nWhen this invalid metadata value reaches `Durable->setDamage()`, an exception is thrown because the metadata is not within the expected range for damage values.\n\nThis can be reproduced with either a too-large damage value, or a negative one.\n\n### Patches\nc8e1cfcbee4945fd4b63d2a7e96025c59744d4f1\n\n### Workarounds\nIn theory this can be checked by plugins using a custom `TypeConverter`, but this is likely to be very cumbersome.\n\n### For more information\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" : "4.2.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pmmp/PocketMine-MP/security/advisories/GHSA-46c5-pfj8-fv65"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pmmp/PocketMine-MP/commit/c8e1cfcbee4945fd4b63d2a7e96025c59744d4f1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pmmp/PocketMine-MP"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-704" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-18T22:36:03Z",
    "nvd_published_at" : null
  }
}