CVE-2024-48957
NoneCVSS
—
EPSS
0.5%
Published
Oct 10, 2024
CISA due date
—
Cloudanix analysis
A bug in a widely used file unpacking library can let attackers crash programs or potentially take them over by sending a specially made archive file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
Out-of-bounds memory access occurs in execute_filter_audio when processing crafted RAR archives because the source pointer can advance past the destination buffer in archive_read_support_format_rar.c.
Why it matters to the business
Systems that unpack or inspect untrusted RAR files may crash or allow arbitrary code execution, disrupting build pipelines, container image creation, and any software distribution workflows that rely on libarchive.
How an attack unfolds
An attacker crafts a malicious RAR archive that manipulates the audio filter state so src advances beyond dst during decompression; when the victim application uses a vulnerable libarchive version to read the archive, the out-of-bounds access is triggered, potentially leading to memory corruption.
How to fix it
Upgrade libarchive to a version containing commit 12ecf8418ab3595d66cdea1abadcea8b6a9d288b (equivalent to 3.7.5 or later) or update github.com/moby/buildkit to 0.12.5 or newer; rebuild and redeploy any dependent images or binaries.
How to confirm the fix worked
Verify installed libarchive version is 3.7.5 or later and buildkit is 0.12.5 or later; run regression tests with known-malformed RAR samples to confirm absence of crashes or sanitizer violations.
Typical attack path
- Attacker generates a specially malformed RAR archive targeting the audio filter code path
- Malicious archive is delivered via download, package repository, or build context
- Victim process invokes libarchive to extract or list contents of the archive
- execute_filter_audio performs the out-of-bounds read/write
- Resulting memory corruption may be leveraged for denial of service or code execution
How to detect it
Monitor process crash logs and sanitizer reports for faults originating in archive_read_support_format_rar.c; inspect build and extraction logs for unexpected failures when handling RAR files.
What your security team should do
- Immediately inventory all hosts and containers using libarchive or buildkit and prioritize upgrades
- Block untrusted RAR archives at ingress points until patches are applied
- Add version checks to CI/CD pipelines to prevent reintroduction of vulnerable builds
The record
execute_filter_audio in archive_read_support_format_rar.c in libarchive before 3.7.5 allows out-of-bounds access via a crafted archive file because src can move beyond dst.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.21 | libarchive | 0 | 3.7.5-r0 |
| Alpine:v3.22 | libarchive | 0 | 3.7.5-r0 |
| Debian:12 | libarchive | 0 | No fix |
| Debian:13 | libarchive | 0 | No fix |
| Debian:14 | libarchive | 0 | 3.7.2-2.1 |
| Mageia:9 | libarchive | 0 | 3.6.2-5.2.mga9 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | libarchive | 0 | 3.7.2-150600.3.6.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | libarchive | 0 | 3.7.2-150600.3.6.1 |
| Ubuntu:20.04:LTS | libarchive | 0 | 3.4.0-2ubuntu1.3 |
| Ubuntu:22.04:LTS | libarchive | 0 | 3.6.0-1ubuntu1.2 |
| Ubuntu:24.04:LTS | libarchive | 0 | 3.7.2-2ubuntu0.2 |
| Ubuntu:24.10 | libarchive | 0 | 3.7.4-1 |
| Ubuntu:Pro:14.04:LTS | libarchive | 0 | 3.1.2-7ubuntu2.8+esm3 |
| Ubuntu:Pro:16.04:LTS | libarchive | 0 | 3.1.2-11ubuntu0.16.04.8+esm1 |
| Ubuntu:Pro:18.04:LTS | libarchive | 0 | 3.2.2-3.1ubuntu0.7+esm1 |
| openSUSE:Leap 15.6 | libarchive | 0 | 3.7.2-150600.3.6.1 |
Related vulnerabilities
- JLSEC-2025-250 libarchive through 3.7.7 has a heap-based buffer over-read in header_gnu_longlink in… Also affects libarchive
- CVE-2024-57970 libarchive through 3.7.7 has a heap-based buffer over-read in header_gnu_longlink in… Also affects libarchive
- CVE-2024-48958 execute_filter_delta in archive_read_support_format_rar.c in libarchive before 3.7.5… Also affects libarchive
- CVE-2024-20696 Windows Libarchive Remote Code Execution Vulnerability Also affects libarchive
- CVE-2017-14502 read_header in archive_read_support_format_rar.c in libarchive 3.3.2 suffers from an… Also affects libarchive
- CVE-2016-10209 The archive_wstring_append_from_mbs function in archive_string.c in libarchive 3.2.2… Also affects libarchive
- CVE-2016-5418 The sandboxing code in libarchive 3.2.0 and earlier mishandles hardlink archive entries… Also affects libarchive
- CVE-2015-8921 The ae_strtofflags function in archive_entry.c in libarchive before 3.2.0 allows remote… Also affects libarchive