GHSA-46c5-pfj8-fv65: Pocketmine/pocketmine mp Improperly Checked Metadata On Tools/armour Vulnerability
HIGHGHSA-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
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-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.
Upgrade pocketmine/pocketmine-mp to 4.2.4
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
GHSA-46c5-pfj8-fv65 Affected Pocketmine/pocketmine mp Versions
1 component(s)| 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?
Which Pocketmine/pocketmine mp versions are affected?
What version fixes GHSA-46c5-pfj8-fv65?
Is pocketmine/pocketmine-mp affected?
What is the CVSS score of GHSA-46c5-pfj8-fv65?
What CWE is associated with GHSA-46c5-pfj8-fv65?
How can I check Packagist dependencies for GHSA-46c5-pfj8-fv65?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}