CVE-2023-22895
JSON

7.5high

bzip2 allows attackers to cause a denial of service via a large file that triggers an integer overflow

Severity
7.5high CVSS:3.1 by CISA-ADP
Exploit likelihood
1.34% (higher than 72% of CVEs)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-96jv-r488-c2rjRUSTSEC-2023-0004

Description

The bzip2 crate before 0.4.4 for Rust allow attackers to cause a denial of service via a large file that triggers an integer overflow in mem.rs. NOTE: this is unrelated to the https://crates.io/crates/bzip2-rs product.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
bzip2 (crates.io)before 0.4.4, from 0.0.0-0 before 0.4.4GitHub Advisory Database, RustSec Advisory Database
bzip2_project bzip2before 0.4.4NVD

All scores

CISA-ADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-190

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

The bzip2 crate before 0.4.4 for Rust allow attackers to cause a denial of service via a large file that triggers an integer overflow in mem.rs. NOTE: this is unrelated to the https://crates.io/crates/bzip2-rs product.

GitHub Advisory Database

The bzip2 crate before 0.4.4 for Rust allow attackers to cause a denial of service via a large file that triggers an integer overflow in mem.rs. NOTE: this is unrelated to the https://crates.io/crates/bzip2-rs product.

RustSec Advisory Database

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.

NVD (es)

bzip2 crate anterior a 0.4.4 para Rust permite a los atacantes provocar una denegación de servicio a través de un archivo grande que desencadena un desbordamiento de enteros en mem.rs. NOTA: esto no está relacionado con el producto https://crates.io/crates/bzip2-rs.

References

https://github.com/alexcrichton/bzip2-rs/pull/86exploit, patch, third-party-advisory, web
https://crates.io/crates/bzip2/versionspatch, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MI5SVRSGKBWB2JGDLDVIFY5ZQVDZP6I7/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SQK57GGXJX3AH7KF6S7S3N7JC5QOYUQ7/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UUK2JO25PPA6XBREKJRBLRCD22LKIOLO/vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2023-22895advisory
https://github.com/alexcrichton/bzip2-rs/commit/90c9c182cd5a5ebc75810aebd89b347a7bdf590bweb
https://github.com/alexcrichton/bzip2-rspackage
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MI5SVRSGKBWB2JGDLDVIFY5ZQVDZP6I7web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SQK57GGXJX3AH7KF6S7S3N7JC5QOYUQ7web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UUK2JO25PPA6XBREKJRBLRCD22LKIOLOweb
https://rustsec.org/advisories/RUSTSEC-2023-0004.htmladvisory, web

Sources

SourceRecordLicence
CVE ListCVE-2023-22895 changed 2025-04-07CVE Terms of Use
GitHub Advisory DatabaseGHSA-96jv-r488-c2rj changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2023-0004 changed 2023-11-08CC0-1.0
NVDCVE-2023-22895 changed 2026-06-17Public domain