Skip to content

Uncapped length of skin data fields submitted by players

High severity GitHub Reviewed Published Jan 4, 2022 in pmmp/PocketMine-MP • Updated Jan 11, 2023

Package

composer pocketmine/pocketmine-mp (Composer)

Affected versions

< 3.26.5
>= 4.0.0, < 4.0.5

Patched versions

3.26.5
4.0.5

Description

Impact

Some skin data fields (e.g. skinID, geometryName) are not capped in length. These fields are typically saved in the NBT data of a player when the player quits the server, or during an autosave.

This is problematic due to the 32767 byte limit on TAG_Strings. If any of these fields exceeds 32767 bytes, an exception will be thrown during data saving, which will cause the server to crash.

Other fields (such as skinGeometryData) are also uncapped, but those have a much larger 2 GB length limit, so this is not a concern for those, particularly considering the decompressed packet size limit of 2 MB.

Patches

PM3: 958a9dbf0fe3131ab60319c5a939f5dfbfe5dfbb
PM4: 6492cac5c10f9fa8443ceddd2191a7b65b73f601

Workarounds

A plugin may check player skins during PlayerLoginEvent and PlayerSkinChangeEvent and ensure that the offending fields are not larger than 32767 bytes.

For more information

If you have any questions or comments about this advisory:

References

@dktapps dktapps published to pmmp/PocketMine-MP Jan 4, 2022
Reviewed Jan 6, 2022
Published to the GitHub Advisory Database Jan 6, 2022
Last updated Jan 11, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weaknesses

No CWEs

CVE ID

No known CVE

GHSA ID

GHSA-c6fg-99pr-25m9

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.