Advisory

GHSA-x7vr-c387-8w57

Also known as: CVE-2019-25008, CVE-2020-25574, GHSA-xvc9-xwgj-4cq9, RUSTSEC-2019-0033

Summary

Integer Overflow/Infinite Loop in the http crate

Details

HeaderMap::reserve() used usize::next_power_of_two() to calculate the increased capacity. However, next_power_of_two() silently overflows to 0 if given a sufficiently large number in release mode.

If the map was not empty when the overflow happens, the library will invoke self.grow(0) and start infinite probing. This allows an attacker who controls the argument to reserve() to cause a potential denial of service (DoS).

The flaw was corrected in 0.1.20 release of http crate.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2021-08-25 21:01 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

http

crates.io · All systems

Affected

  • introduced 0, fixed 0.1.20 (semver)

Fixed versions

0.1.20

Fix

  • Fixed version 0.1.20
    cargo update -p http --precise 0.1.20

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences