/

CVE-2022-51017

Severity:

HIGH RISK

(7.5)

Improper Input Validation (CWE-20) in PocketMine-MP Server

CVE-2022-51017

Deferred

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20

Impact:

Denial of Service

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

PocketMine-MP versions before 3.26.5 and 4.0.5 do not adequately limit the length of player-submitted skin data fields. Oversized values such as skinID or geometryName can exceed the 32,767-byte NBT string limit, trigger serialization exceptions, and cause the game server to crash.

Affected context

The vulnerability occurs in PocketMine-MP server deployments that process player skin data without enforcing maximum lengths before NBT serialization. It becomes risky when an attacker can connect as a player and submit crafted skin metadata that reaches the affected serialization path.

Exploit preconditions

  • Attack surface: Player network protocol and skin-data handling
  • Required access: Ability to connect to the PocketMine-MP server as a player
  • Trigger point: Processing and serializing oversized skin fields into NBT data
  • Why exploitation is possible: Input length is not capped before the value is handled by a serializer with a 32,767-byte string limit

Why this happens

The underlying bug is insufficient validation of externally supplied string lengths. Player-controlled skin fields are accepted without enforcing the size constraints required by the downstream NBT serializer. When an oversized value reaches serialization, the serializer may raise an exception rather than safely rejecting the input, mapping the issue to CWE-20: Improper Input Validation.

Potential impact

  • A malicious player could crash the PocketMine-MP server
  • Server availability could be disrupted through repeated malformed requests
  • Connected players could be disconnected
  • Scheduled gameplay services or dependent integrations could become unavailable

General mitigation guidance

Mitigation generally focuses on validating protocol data before it reaches serialization or other bounded components.

Common defensive patterns include:

  • Enforcing explicit maximum lengths for every player-controlled skin field
  • Rejecting malformed or oversized values early and handling rejection without uncaught exceptions
  • Applying serializer-compatible limits at input boundaries
  • Treating client-provided metadata as untrusted regardless of protocol expectations
  • Running game services with least-privilege permissions and suitable process isolation
  • Using rate limits or connection controls to reduce repeated malformed submissions

Validation should remain consistent across all protocol handlers and serialization paths.

How teams detect issues like this

Detection can include:

  • Static analysis checks for externally sourced strings passed to bounded serializers without length validation
  • Code review for missing limits on skin metadata and other client-controlled fields
  • Runtime monitoring for repeated serialization exceptions, abnormal disconnects, or unexpected server restarts
  • Fuzz testing of protocol fields with boundary and oversized values
  • Policy enforcement requiring schema, range, and length validation at network input boundaries

Automated review tools may help identify unchecked data flows, but runtime testing and operational monitoring are also useful for this class of failure.

Sources

SourceLink
github.comgithub.com/pmmp/PocketMine-MP/commit/6492cac5c10f9fa8443ceddd2191a7b65b73f601
github.comgithub.com/pmmp/PocketMine-MP/commit/958a9dbf0fe3131ab60319c5a939f5dfbfe5dfbb
github.comgithub.com/pmmp/PocketMine-MP/security/advisories/GHSA-c6fg-99pr-25m9
vulncheck.comvulncheck.com/advisories/pocketmine-mp-before-3.26.5-and-4.0.5-denial-of-service-via-skin-data

Frequently asked

questions

Yes, in deployments where unauthenticated or authenticated players can connect and submit skin metadata. The attacker does not need to compromise the host if the vulnerable protocol path is exposed.

The key requirement is the ability to establish a player connection and send skin data that is processed by the server.

Enforce strict maximum lengths before serialization, reject invalid values safely, and ensure malformed input cannot produce an uncaught exception.

Define protocol-level size limits, validate all client-controlled fields at trust boundaries, fuzz test boundary conditions, and monitor for repeated parsing or serialization failures.

Find out what's already
exploitable in your codebase.