Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. pocketmine/pocketmine-mp
  4. ›
  5. GMS-2023-1797

GMS-2023-1797: PocketMine-MP vulnerable to improperly checked dropped item count leading to server crash

June 6, 2023

Impact

In 4.18.0, the network handling of inventories was completely revamped. Due to this, a bug was introduced which allowed players to request that the server drop more of an item than they had available in their hotbar.

This does not lead to any duplication issues, but instead led to a server crash, and is believed to have been exploited in the wild.

Patches

This was fixed in 58974765a68f63a9968a7ff3a06f584ff2ee08d2, which was released in 4.18.1.

Workarounds

Handle InventoryTransactionPacket in DataPacketReceiveEvent, and verify that the item count dropped isn’t more than the available item count. However, it’s complicated to do this, so it’s not recommended.

References

  • github.com/advisories/GHSA-h87r-f4vc-mchv
  • github.com/pmmp/PocketMine-MP/blob/4.18.1/changelogs/4.18.md
  • github.com/pmmp/PocketMine-MP/commit/58974765a68f63a9968a7ff3a06f584ff2ee08d2
  • github.com/pmmp/PocketMine-MP/security/advisories/GHSA-h87r-f4vc-mchv

Code Behaviors & Features

Detect and mitigate GMS-2023-1797 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.18.1

Fixed versions

  • 4.18.1

Solution

Upgrade to version 4.18.1 or above.

Source file

packagist/pocketmine/pocketmine-mp/GMS-2023-1797.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:04 +0000.