Vulnerability HighRUSTSEC-2023-0004 · bzip2
RUSTSEC-2023-0004: bzip2 Denial of Service (DoS)
Short answerA security vulnerability in the bzip2 crate: bzip2 Denial of Service (DoS). GitHub rates it High. Fixed in 0.4.4: update to a fixed version.
| Crate | bzip2 |
|---|---|
| Type | Vulnerability (denial-of-service) |
| Affected versions | Before 0.4.4. |
| Fixed in | 0.4.4 |
| Severity | High (GitHub rating) |
| Published | 2023-01-09 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2023-22895, GHSA-96jv-r488-c2rj |
What to do
- See which version you have:
cargo tree -i bzip2(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p bzip2. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplebzip2 = "0.4.4") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
Working with specific payloads can cause a Denial of Service (DoS) vector.
Both Decompress and Compress implementations can enter into infinite loops given specific payloads entered that trigger it.
The issue is described in great detail in the bzip2 repository issue.
Thanks to bjrjk for finding and providing the patch for the issue and the maintainer responsibly responding to release a fix quickly.
Users who use the crate with untrusted data should update the bzip2 to 0.4.4.
References
- Package: crates.io/crates/bzip2
- Advisory: rustsec.org/advisories/RUSTSEC-2023-0004.html
- Web: github.com/alexcrichton/bzip2-rs/pull/86
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Same cratebzip2: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?