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.

