Every CVE Search/ Get API key

CVE-2020-25574

Integer Overflow/Infinite Loop in the http crate

7.5 HighFix available

An issue was discovered in the http crate before 0.1.20 for Rust. An integer overflow in HeaderMap::reserve() could result in denial of service (e.g., an infinite loop).

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

2.53%Up 1.8 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 7.5

An issue was discovered in the http crate before 0.1.20 for Rust. An integer overflow in HeaderMap::reserve() could result in denial of service (e.g., an infinite loop).

Record
CVE-2020-25574
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-190, CWE-835
Updated
2026-11-02
CVE List No score

An issue was discovered in the http crate before 0.1.20 for Rust. An integer overflow in HeaderMap::reserve() could result in denial of service (e.g., an infinite loop).

Record
CVE-2020-25574
Updated
2026-11-02
EUVDEUVD-2021-1930 No score

An issue was discovered in the http crate before 0.1.20 for Rust. An integer overflow in HeaderMap::reserve() could result in denial of service (e.g., an infinite loop).

Record
EUVD-2021-1930
Updated
2026-11-03
GitHub AdvisoriesGHSA-x7vr-c387-8w57 7.5

Integer Overflow/Infinite Loop in the http crate

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.

Record
GHSA-x7vr-c387-8w57
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-190, CWE-835
Updated
2026-11-02
OSV 7.5

An issue was discovered in the http crate before 0.1.20 for Rust. An integer overflow in HeaderMap::reserve() could result in denial of service (e.g., an infinite loop).

Record
CVE-2020-25574
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2020-25574 7.5

An issue was discovered in the http crate before 0.1.20 for Rust. An integer overflow in HeaderMap::reserve() could result in denial of service (e.g., an infinite loop).

Record
DEBIAN-CVE-2020-25574
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 4 moreShow less
OSVGHSA-x7vr-c387-8w57 7.5

Integer Overflow/Infinite Loop in the http crate

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.

Record
GHSA-x7vr-c387-8w57
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-190, CWE-835
Updated
2026-11-02
OSVGHSA-xvc9-xwgj-4cq9 7.5

Duplicate Advisory: Integer Overflow in HeaderMap::reserve() can cause Denial of Service

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-x7vr-c387-8w57. This link is maintained to preserve external references.

Original Description

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.

Record
GHSA-xvc9-xwgj-4cq9
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-190
Updated
2026-11-02
OSVRUSTSEC-2019-0033 7.5

Integer Overflow in HeaderMap::reserve() can cause Denial of Service

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.

Record
RUSTSEC-2019-0033
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2020-25574 7.5

An issue was discovered in the http crate before 0.1.20 for Rust. An integer overflow in HeaderMap::reserve() could result in denial of service (e.g., an infinite loop).

Record
UBUNTU-CVE-2020-25574
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
http
crates.io
before 0.1.20
0.1.20
rust-http
Debian:12
before 0.1.19-2
0.1.19-2
rust-http
Debian:13
before 0.1.19-2
0.1.19-2
rust-http
Debian:14
before 0.1.19-2
0.1.19-2
http
crates.io
From an advisory covering 2 CVEs
before 0.1.20
0.1.20
http
crates.io
From an advisory covering 2 CVEs
0.0.0-0 up to 0.1.20
0.1.20
rust-http
Ubuntu:20.04:LTS
All versions, plus listed versions
0.1.17-10.1.19-1
None known
rust-http
Ubuntu:24.04:LTS
All versions, plus listed versions
0.2.7-10.2.9-1
None known
rust-http
Ubuntu:25.10
All versions, plus listed versions
1.2.0-1
None known
rust-http
Ubuntu:26.10
All versions, plus listed versions
1.3.1-11.4.0-11.5.0-1
None known
rust-http
Ubuntu:26.04:LTS
All versions, plus listed versions
1.2.0-11.3.1-1
None known

History

History
RecordedChangedSources
affected, facts
affected
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2020-25574 is a high vulnerability (CVSS 7.5) in Hyper Http, published November 16, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.53%, the 84th percentile. Fixed in http 0.1.20.

References

Show 4 moreShow less
MoveEnter Open