Vulnerability MediumRUSTSEC-2024-0003 · h2
RUSTSEC-2024-0003: Resource exhaustion vulnerability in h2 may lead to Denial of Service (DoS)
Short answerA security vulnerability in the h2 crate: Resource exhaustion vulnerability in h2 may lead to Denial of Service (DoS). GitHub rates it Medium. Fixed in 0.3.24, 0.4.2: update to a fixed version.
| Crate | h2 |
|---|---|
| Type | Vulnerability (denial-of-service) |
| Affected versions | Before 0.3.24; from 0.4.0 before 0.4.2. |
| Fixed in | 0.3.24, 0.4.2 |
| Severity | Medium (GitHub rating) |
| Published | 2024-01-17 |
| Last changed | 2026-02-04 |
| Also known as | GHSA-8r5v-vm4m-4g25 |
What to do
- See which version you have:
cargo tree -i h2(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p h2. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleh2 = "0.4.2") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
An attacker with an HTTP/2 connection to an affected endpoint can send a steady stream of invalid frames to force the generation of reset frames on the victim endpoint. By closing their recv window, the attacker could then force these resets to be queued in an unbounded fashion, resulting in Out Of Memory (OOM) and high CPU usage.
This fix is corrected in hyperium/h2#737, which limits the total number of internal error resets emitted by default before the connection is closed.
References
- Package: crates.io/crates/h2
- Advisory: rustsec.org/advisories/RUSTSEC-2024-0003.html
- Advisory: github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for h2
Up next
Same crateh2: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?