GHSA-pjrj-h4fg-6gm4 is a medium-severity (CVSS 5.3) Uncontrolled Resource Consumption vulnerability in tokio-boring. A fix is available for tokio-boring — see the affected versions and patch details below.
tokio-boring vulnerable to resource exhaustion via memory leak
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-pjrj-h4fg-6gm4 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 379,842 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
tokio-boringReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
Impact
The tokio-boring library in version 4.0.0 is affected by a memory leak issue that can lead to excessive resource consumption and potential DoS by resource exhaustion. The set_ex_data function used by the library did not deallocate memory used by pre-existing data in memory each time after completing a TLS connection causing the program to consume more resources with each new connection.
Patches
The issue is fixed in version 4.1.0 of tokio-boring.
References
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | tokio-boring | ≥ 4.0.0&&< 4.1.0 | 4.1.0cargo update -p tokio-boring --precise 4.1.0 |
Affected Products
boringcloudflareDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for tokio-boring, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update tokio-boring to 4.1.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-pjrj-h4fg-6gm4 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is GHSA-pjrj-h4fg-6gm4 in your dependencies?
Find it across crates.io, including transitive dependencies.