Integer Overflow in HeaderMap::reserve() can cause Denial of Service
Historical advisory saved 24 Oct 2026 13:19:54 UTC. The publisher may have updated it since then. Latest advisory.
osv · RUSTSEC-2019-0033
Published`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.
- Source published
- 16 Nov 2019 12:00:00 UTC
- Source modified
- 8 Nov 2023 04:01:32 UTC
- Saved here
- 24 Oct 2026 13:19:54 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H