Skip to content

GHSA-79rc-jjh6-rc89 CVE-2023-54355

PocketMine-MP server crash due to incorrect EC curve used for LoginPacket identityPublicKey

High Packagist
Severity
8.7 / 10
High · CVSS 4.0
Exploit chance (EPSS)
0.38%
Chance of exploitation in the next 30 days. Higher than 32.42% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-347 Improper Verification of Cryptographic Signature
Fix
5.3.1
Upgrade pocketmine/pocketmine-mp to this version or later

Description

Impact

The server uses ECDH to calculate a shared secret for the symmetric encryption key used to encrypt network packets after logging in. ECDH requires that the keys used must both belong to the same elliptic curve. In Minecraft: Bedrock Edition, the curve used is secp384r1.

Using any other curve (for example secp256r1) to sign the LoginPacket JWTs would lead to successfully verifying the login chain, but would later crash due to an uncaught exception during ECDH key derivation due to the client-provided key belonging to a different curve than the server's key. It's also theoretically possible that a non-EC key could be used (e.g. RSA or DH), which would also pass login verification as long as SHA384 hashing algorithm was used for the JWT signatures, and also lead to a crash.

Patches

The problem was fixed in 4.23.1 and 5.3.1 in the following commit: 4e646d19a4a1e0d082bd4d1f5a58ae0182a268d9 While 4.x would not have crashed when this was encountered, the faulty validation code has also been corrected there.

Workarounds

A plugin could handle LoginPacket and check that all of the identityPublicKeys provided in the JWT bodies actually belong to secp384r1. This can be checked by verifying that openssl_pkey_get_details($key)["ec"]["curve_name"] is set and equal to secp384r1. Beware that this element may not exist if the key is not an EC key at all.

Affected versions

Packagist

PackageVulnerableFixed in
pocketmine/pocketmine-mp
>= 5.2.0, < 5.3.1
5.3.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

pocketmine/pocketmine-mp Packagist → 5.3.1

composer
composer require pocketmine/pocketmine-mp:^5.3.1

Severity breakdown

CVSS 4.0 8.7

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None
Exploit maturity
Not defined
Scope
X

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

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

Weakness

CWE-347: Improper Verification of Cryptographic Signature

The product does not verify, or incorrectly verifies, the cryptographic signature for data.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-pg53-p7qp-65cv
PocketMine-MP has potential memory/network vulnerability from repeated ResourcePackClientResponsePacket packets
Low Also affects pocketmine/pocketmine-mp
GHSA-xp4f-g2cm-rhg7
PocketMine-MP has LogDoS by many junk properties in client data JWT in LoginPacket
Medium Also affects pocketmine/pocketmine-mp
GHSA-f9jp-856v-8642
PocketMine-MP: Player entities can still die and drop items in flaggedForDespawn state
Medium Also affects pocketmine/pocketmine-mp
GHSA-7hmv-4j2j-pp6f
PocketMine-MP: Network amplification vulnerability with `ActorEventPacket`
Medium Also affects pocketmine/pocketmine-mp
GHSA-788v-5pfp-93ff
PocketMine-MP: JSON decoding of unlimited size large arrays/objects in ModalFormResponse Handling
Medium Also affects pocketmine/pocketmine-mp
GHSA-h6rj-3m53-887h
PocketMine-MP: LogDoS by large complex unknown property logging in clientData in LoginPacket
High Also affects pocketmine/pocketmine-mp
GHSA-fqqv-56h5-f57g
PocketMine-MP `ResourcePackDataInfoPacket` amplification vulnerability due to lack of resource pack sequence status checking
Medium Also affects pocketmine/pocketmine-mp
GHSA-g274-c6jj-h78p
PocketMine-MP allows malicious client data to waste server resources due to lack of limits for explode()
Medium Also affects pocketmine/pocketmine-mp
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor