# GHSA-w98g-5fmx-wm4x: pocketmine/raklib reliable-ordered queue size is unlimited, allowing a session to hog server memory

> A malicious client can exhaust server memory by sending incomplete reliable-ordered packet sequences, causing a denial of service.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Nov 2023

## What is GHSA-w98g-5fmx-wm4x?

GHSA-w98g-5fmx-wm4x is a denial of service vulnerability in pocketmine/raklib, published on 15 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
A client can send reliable-ordered packets 0, 2, 3, 4, 5 ... etc, and all the packets 2 and up will stay in the reliable-ordered queue until 1 arrives. A malicious client can exploit this to waste all available server memory by simply never sending the missing packet. Since the server doesn't make any effort to limit the size of the queue or detect this kind of abuse, this problem is easy to abuse.

### Patches
This bug was fixed on the 0.14.x and 0.15.x release lines by 371190f5854372154d1b263cd2a10e658e92bebe.

### Workarounds
No workaround is known.

## Which versions are affected by GHSA-w98g-5fmx-wm4x?

4 open source packages ship an affected version, including pocketmine/raklib.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pocketmine/raklib` | Packagist | From 0.14.0 | 0.14.6 |
| `pocketmine/raklib` | Packagist | From 0.14.0 | 0.14.6 |
| `pocketmine/raklib` | Packagist | From 0.15.0 | 0.15.1 |
| `pocketmine/raklib` | Packagist | From 0.15.0 | 0.15.1 |

## How do I fix GHSA-w98g-5fmx-wm4x?

Upgrade pocketmine/raklib to a fixed version for your release line: 0.14.6 or 0.15.1.

## Is GHSA-w98g-5fmx-wm4x being exploited?

There is no known exploitation of GHSA-w98g-5fmx-wm4x in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-w98g-5fmx-wm4x and fix it if it is affected.

What it is: GHSA-w98g-5fmx-wm4x is a denial of service vulnerability in pocketmine/raklib, published on 15 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-w98g-5fmx-wm4x in the wild and no public exploit code.

Affected packages and fixed versions:
- pocketmine/raklib (Packagist): affected from 0.14.0; fixed in 0.14.6
- pocketmine/raklib (Packagist): affected from 0.14.0; fixed in 0.14.6
- pocketmine/raklib (Packagist): affected from 0.15.0; fixed in 0.15.1
- pocketmine/raklib (Packagist): affected from 0.15.0; fixed in 0.15.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-w98g-5fmx-wm4x/ (Markdown: https://insights.sbomify.com/GHSA-w98g-5fmx-wm4x/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-w98g-5fmx-wm4x

---
From sbomify Insights: https://insights.sbomify.com/GHSA-w98g-5fmx-wm4x/
Summaries are generated and may contain mistakes; the official description above is the record.
