CVE-2021-28879 json
In the standard library in Rust before 1.52.0, the Zip implementation can report an incorrect size due to an integer overflow.
published 5y ago modified 4mo ago also EUVD-2021-15532
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.4%
- EPSS 2.4% chance of exploitation in 30 days, percentile 84%
- public exploits
- 0
- none known
Summary
In the standard library in Rust before 1.52.0, the Zip implementation can report an incorrect size due to an integer overflow. This bug can lead to a buffer overflow when a consumed Zip iterator is used again.
Patch / fix
- rust-lang rust 1.52.0
- rustc Debian 14, Debian 13, Debian 12 1.53.0+dfsg1-1
debian advisories DEBIAN-CVE-2021-28879
- rustc Ubuntu 20.04 LTS 1.53.0+dfsg1+llvm-4ubuntu1~20.04.1
- rustc Ubuntu 22.04 LTS 1.53.0+dfsg1+llvm-4ubuntu1
ubuntu advisories UBUNTU-CVE-2021-28879
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- rls RHEL 8 1.52.1-1.module+el8.4.0+11282+0729bac9
- rust RHEL 8 1.52.1-1.module+el8.4.0+11282+0729bac9
- cargo RHEL 8 1.52.1-1.module+el8.4.0+11282+0729bac9
- clippy RHEL 8 1.52.1-1.module+el8.4.0+11282+0729bac9
- rustfmt RHEL 8 1.52.1-1.module+el8.4.0+11282+0729bac9
- rust-gdb RHEL 8 1.52.1-1.module+el8.4.0+11282+0729bac9
- rust-src RHEL 8 1.52.1-1.module+el8.4.0+11282+0729bac9
- rust-lldb RHEL 8 1.52.1-1.module+el8.4.0+11282+0729bac9
red hat advisories RHSA-2021:3063RHSA-2021:3042
- rust Rocky Linux 8 1.52.1-1.module+el8.4.0+641+ca238f88
- rust-toolset Rocky Linux 8 1.52.1-1.module+el8.4.0+641+ca238f88
rocky linux advisories RLSA-2021:3063
- rust Arch Linux 1:1.52.0-1
arch linux advisories AVG-1801
- github.com/rust-lang/rust#82289 pull request
Is CVE-2021-28879 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-28879 updated cvss 9.8
rust: integer overflow in the Zip implementation can lead to a buffer overflow
-
Red Hat Developer Tools for Red Hat Enterprise Linux Server (v. 7) rust-toolset-1.52 1.52.1-1.el7_9, rust-toolset-1.52-rls 1.52.1-2.el7_9, rust-toolset-1.52-rust 1.52.1-2.el7_9, rust-toolset-1.52-build 1.52.1-1.el7_9, rust-toolset-1.52-cargo 1.52.1-2.el7_9, rust-toolset-1.52-clippy 1.52.1-2.el7_9, +7 morefixed: vendor fix RHSA-2021:3042
-
Red Hat Enterprise Linux AppStream (v. 8) rls 1.52.1-1.module+el8.4.0+11282+0729bac9, rust 1.52.1-1.module+el8.4.0+11282+0729bac9, cargo 1.52.1-1.module+el8.4.0+11282+0729bac9, clippy 1.52.1-1.module+el8.4.0+11282+0729bac9, rustfmt 1.52.1-1.module+el8.4.0+11282+0729bac9, rust-gdb 1.52.1-1.module+el8.4.0+11282+0729bac9, +5 morefixed: vendor fix RHSA-2021:3063
-
Red Hat Enterprise Linux 9 rust, cargo, clippy, rustfmt, rust-gdb, rust-src, +7 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
2.41% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/rust-lang/rust/issues/82282 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
- Weakness
-
- CWE-190 Integer Overflow or Wraparound
References
-
github.com
/rust-lang/rust/pull/82289
patch, third-party-advisory
-
github.com
/rust-lang/rust/issues/82282
exploit, issue-tracking, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/CZ337CM4GFJLRDFVQCGC7J25V65JXOG5/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/VZG65GUW6Z2CYOQHF7T3TB5CZKIX6ZJE/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/TFUO3URYCO73D2Q4WYJBWAMJWGGVXQO4/
vendor-advisory
-
security.gentoo.org
/glsa/202210-09
vendor-advisory, third-party-advisory
Sources
- CVE List CVE-2021-28879
- NVD CVE-2021-28879
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.