CVE-2025-1632
Executive Summary
CVE-2025-1632 is a null pointer dereference vulnerability in libarchive, specifically within the bsdunzip.c file's list function. This issue affects libarchive versions up to and including 3.7.7. The vulnerability is classified as problematic with a low severity, as it requires local access and user interaction to exploit. The primary impact is a denial of service (DoS) condition, where a crafted archive file can cause the application to crash. The vendor was contacted but did not respond, leaving the patch status as unknown. Public exploit code has been disclosed, increasing the risk of targeted attacks.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the libarchive library, which is a critical component in many Linux distributions and software packages. It is used by package managers, backup tools, and file archivers. A null pointer dereference in this library can lead to instability in any application that processes archive files using libarchive. Organizations should monitor for updates from their Linux distribution vendors and consider applying workarounds until an official patch is available.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
- Base Score: 3.3 (Low)
- Attack Vector: Local (AV:L) – The attacker must have local access to the system.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – No authentication is needed.
- User Interaction: Required (UI:R) – The victim must open a malicious archive file.
- Scope: Unchanged (S:U) – The vulnerability does not affect other components.
- Confidentiality Impact: None (C:N) – No data exposure.
- Integrity Impact: None (I:N) – No data modification.
- Availability Impact: Low (A:L) – The application crashes, causing a denial of service.
Threat Level: Low. The requirement for local access and user interaction significantly reduces the attack surface. However, the public availability of exploit code and the lack of a vendor patch elevate the risk for targeted attacks.
Deep Dive & Mechanics
The vulnerability resides in the list function within bsdunzip.c. This function is responsible for listing the contents of an archive file. The null pointer dereference occurs when the function attempts to access a pointer that has not been properly initialized or has been set to NULL due to malformed archive data.
Root Cause: The list function does not properly validate the return value of a memory allocation or a pointer retrieval operation. When processing a specially crafted archive, this operation returns NULL, and the function subsequently dereferences this NULL pointer without a check, leading to a crash.
Trigger: The vulnerability is triggered by opening a malicious archive file (e.g., a crafted ZIP file) using the bsdunzip utility or any application that uses libarchive's listing functionality.
Impact: Successful exploitation results in a denial of service. The application crashes, potentially causing data loss if unsaved work is present. In a server context, this could lead to service disruption.
Vulnerable vs. Patched Code
The vulnerable code is in the list function of bsdunzip.c. The exact vulnerable line is not publicly specified, but the fix would involve adding a NULL pointer check before dereferencing.
Vulnerable Code (Conceptual):
void list(archive *a) {
struct archive_entry *entry;
while (archive_read_next_header(a, &entry) == ARCHIVE_OK) {
// Vulnerable: entry could be NULL
printf("%s\n", archive_entry_pathname(entry));
}
}
Patched Code (Conceptual):
void list(archive *a) {
struct archive_entry *entry;
while (archive_read_next_header(a, &entry) == ARCHIVE_OK) {
if (entry == NULL) {
// Handle error or skip
continue;
}
printf("%s\n", archive_entry_pathname(entry));
}
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Local access to the target system.
- Ability to deliver a malicious archive file (e.g., via email, USB, or file share).
- Victim must open the file using
bsdunzipor an application using libarchive.
Exploit Steps:
- Create a malicious ZIP file that triggers the null pointer dereference. The exact crafting method is not publicly detailed, but it involves manipulating archive headers to cause a NULL pointer in the
listfunction. - Deliver the file to the victim.
- When the victim runs
bsdunzip -l malicious.zip, the application crashes.
Example Command:
bsdunzip -l malicious.zip
Blue Team
Detection:
- Monitor for crashes of
bsdunzipor applications using libarchive. - Look for unusual archive files being opened, especially from untrusted sources.
- Use file integrity monitoring to detect the introduction of malicious archives.
Prevention:
- Restrict the use of
bsdunzipand libarchive-based tools to trusted users. - Implement application whitelisting to prevent execution of untrusted binaries.
- Use sandboxing or containerization to isolate archive processing.
Mitigation:
- Apply vendor patches when available.
- As a workaround, avoid using the
-l(list) option on untrusted archives. - Consider using alternative archive tools that are not affected.
Indicators of Compromise (IOCs)
- File Hashes: (Example – actual hash will vary)
malicious.zip– SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- Process Names:
bsdunzip,bsdtar, or any process using libarchive. - Event Logs: Application crash logs with exception code
0xC0000005(Access Violation) inbsdunzip.exeor similar. - Network: No network indicators, as this is a local vulnerability.
Detection Engineering
YARA Rule
rule CVE_2025_1632_Null_Pointer_Dereference {
meta:
description = "Detects malicious archive files targeting CVE-2025-1632"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-1632"
strings:
$magic_zip = { 50 4B 03 04 } // ZIP local file header
$null_trigger = { 00 00 00 00 } // Potential null pointer trigger
condition:
$magic_zip at 0 and #null_trigger > 5
}
Sigma Rule
title: CVE-2025-1632 Null Pointer Dereference in bsdunzip
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects crashes of bsdunzip due to null pointer dereference
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: windows
service: application
detection:
selection:
EventID: 1000 # Application Error
ApplicationName: 'bsdunzip.exe'
ExceptionCode: '0xc0000005'
condition: selection
falsepositives:
- Legitimate crashes due to other bugs
level: medium
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2025-1632 Potential Malicious Archive Transfer"; flow:to_client; file_store; fileext:"zip"; content:"|50 4B 03 04|"; depth:4; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Do not use the
-loption on untrusted archive files. - Monitor for vendor patches from your Linux distribution (e.g., Ubuntu, Debian, Red Hat).
- Restrict local access to systems where libarchive is used.
Long-term Fix:
- Apply the official patch from libarchive when released.
- If no patch is forthcoming, consider forking the project or applying a custom patch that adds NULL pointer checks in the
listfunction.
Workarounds:
- Use alternative archive tools like
unzip(Info-ZIP) or7z(p7zip) for listing archives. - Implement application-level input validation to reject malformed archives.
Valters IT Signature: This report was prepared by Valters IT, an elite DevSecOps and Cyber Threat Intelligence team. For further assistance, contact us at [valters@example.com].