Every CVE Search/ Get API key

CVE-2019-25005

Counter overflow in chacha20

7.5 HighFix available

An issue was discovered in the chacha20 crate before 0.2.3 for Rust. A ChaCha20 counter overflow makes it easier for attackers to determine plaintext.

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
High
Integrity
None
Availability
None

Exploit likelihood

1.32%Up 0.9 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 7.5

An issue was discovered in the chacha20 crate before 0.2.3 for Rust. A ChaCha20 counter overflow makes it easier for attackers to determine plaintext.

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

An issue was discovered in the chacha20 crate before 0.2.3 for Rust. A ChaCha20 counter overflow makes it easier for attackers to determine plaintext.

Record
CVE-2019-25005
Updated
2026-11-02
EUVDEUVD-2021-1765 No score

An issue was discovered in the chacha20 crate before 0.2.3 for Rust. A ChaCha20 counter overflow makes it easier for attackers to determine plaintext.

Record
EUVD-2021-1765
Updated
2026-11-03
GitHub AdvisoriesGHSA-j2r6-2m5c-vgh5 7.5

Counter overflow in chacha20

An issue was discovered in the chacha20 crate before 0.2.3 for Rust. A ChaCha20 counter overflow makes it easier for attackers to determine plaintext.

Record
GHSA-j2r6-2m5c-vgh5
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-190
Updated
2026-11-02
OSVGHSA-j2r6-2m5c-vgh5 7.5

Counter overflow in chacha20

An issue was discovered in the chacha20 crate before 0.2.3 for Rust. A ChaCha20 counter overflow makes it easier for attackers to determine plaintext.

Record
GHSA-j2r6-2m5c-vgh5
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-190
Updated
2026-11-02
OSVRUSTSEC-2019-0029 7.5

ChaCha20 counter overflow can expose repetitions in the keystream

The ChaCha20 stream cipher can produce a maximum of 2^32 blocks (~256GB) before the 32-bit counter overflows. Releases of the chacha20 crate prior to v0.2.3 allow generating keystreams larger than this, including seeking past the limit. When this occurs, the keystream is duplicated, with failure modes similar to nonce reuse (i.e. exposure of the XOR of two plaintexts).

The v0.2.3 release now panics in this event, rather than exposing the duplicated keystream. Note this is a "hot fix" solution to the problem and future releases will pursue returning an error in this case.

Users of the chacha20poly1305 crate are unaffected by this as this crate properly asserts the length of the plaintext is less than the maximum allowed (P_MAX as described in RFC 8439 Section 2.8).

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

Affected products

Affected packages

Affected packages
PackageAffectedFixed
chacha20
crates.io
before 0.2.3
0.2.3
chacha20
crates.io
0.0.0-0 up to 0.2.3
0.2.3

History

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

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

In short

CVE-2019-25005 is a high vulnerability (CVSS 7.5) in Chacha20 Project Chacha20, published October 22, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.32%, the 71st percentile. Fixed in chacha20 0.2.3.

References

MoveEnter Open