Skip to content

PocketMine-MP server crash with certain invalid JSON payloads in `LoginPacket` due to dependency vulnerability (3rd time)

High severity GitHub Reviewed Published Mar 5, 2024 in pmmp/PocketMine-MP • Updated May 15, 2024

Package

composer pocketmine/pocketmine-mp (Composer)

Affected versions

< 5.11.1

Patched versions

5.11.1

Description

Impact

An attacker could crash PocketMine-MP by sending malformed JSON in LoginPacket.

netresearch/jsonmapper allows objects to be hydrated from scalar types in JSON. However, due to the lack of validation in the code for this feature, it may output improperly initialized objects if applied to objects whose constructors don't handle the input values.

Code handling these objects in PocketMine-MP could then crash due to @required properties not being set within the objects.

In addition, because JsonMapper does not respect bStrictObjectTypes when processing arrays, it's not possible to avoid the issue by disabling the feature.

Due to the relatively high number of security issues arising from unexpected behaviour in JsonMapper, the team is exploring options to replace it.

Patches

In the meantime, the issue was fixed by pmmp/netresearch-jsonmapper@b96a209 and 6872661fd03649cc7a8762c41c16e9ee5a4de1c9.

Workarounds

Detecting the malicious data that triggers this issue is of rather high difficulty, so it's not likely that a plugin would be able to easily remediate this.

References

cweiske/jsonmapper#225
cweiske/jsonmapper#226

References

@dktapps dktapps published to pmmp/PocketMine-MP Mar 5, 2024
Published to the GitHub Advisory Database Mar 6, 2024
Reviewed Mar 6, 2024
Last updated May 15, 2024

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

EPSS score

Weaknesses

No CWEs

CVE ID

No known CVE

GHSA ID

GHSA-h6j3-j35f-v2x7

Source code

Credits

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