CVE-2026-42442
Executive Summary
CVE-2026-42442 is a null-pointer dereference vulnerability in the UFS/UFS2 filesystem image parser of NanaZip, an open-source file archiver. The flaw exists in versions 5.0.1252.0 through 6.0.1697.9. An attacker can craft a malicious UFS image where the root inode (inode 2) is set to IFLNK (symlink) instead of IFDIR (directory). The parser unconditionally treats the root inode as a directory without verifying its type. When the symlink has an embedded target (small di_size), the directory data buffer becomes zero-length, leading to a null-pointer dereference on the first read. This results in a denial-of-service (DoS) condition, crashing the application. The vulnerability has a CVSS score of 3.3 (Low) and an EPSS score of 0.0%, indicating low exploitation likelihood. A patch is available in version 6.0.1698.0.
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
NanaZip is distributed via GitHub and potentially through package managers like Chocolatey or Scoop. Users should verify the integrity of downloaded binaries using checksums provided by the maintainer. The vulnerability does not affect the supply chain of other packages, but users of NanaZip should update to the patched version to prevent DoS attacks.
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 provide a malicious file to the victim.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: Required (UI:R) – The victim must open the crafted 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) – Application crash, but can be restarted.
Threat Level: Low. The vulnerability requires user interaction and only causes a denial of service. No remote code execution or data theft is possible.
Deep Dive & Mechanics
The vulnerability resides in the UFS/UFS2 filesystem image parser within NanaZip. UFS (Unix File System) and UFS2 are filesystem formats used in BSD and other Unix-like systems. The parser reads the root inode (inode 2) to traverse the directory structure. The root inode is expected to be of type IFDIR (directory). However, the parser does not validate the inode type before using it.
When a crafted UFS image sets the root inode to IFLNK (symlink), the parser still attempts to read directory entries from it. For a symlink with an embedded target (small di_size), the parser allocates a buffer based on the symlink's size. Since the symlink is not a directory, the buffer is zero-length. When the parser tries to read the first directory entry from this zero-length buffer, it dereferences a null pointer, causing a crash.
The vulnerable code path is in the function that processes the root inode. The fix adds a check to ensure the root inode is of type IFDIR before proceeding.
Vulnerable vs. Patched Code
Vulnerable Code (pseudo):
// No type check on root inode
struct inode *root = get_inode(fs, 2);
// Assume root is a directory
struct dir_entry *entries = read_dir_entries(root);
// If root is a symlink with small size, entries is NULL
entries[0]; // Null-pointer dereference
Patched Code (pseudo):
struct inode *root = get_inode(fs, 2);
if (root->type != IFDIR) {
// Handle error: invalid root inode type
return -EINVAL;
}
struct dir_entry *entries = read_dir_entries(root);
// Safe to proceed
The patch ensures that the root inode is a directory before attempting to read directory entries.
Exploitation & Lab Setup
Red Team
Objective: Cause a denial of service on a system running NanaZip by tricking a user into opening a malicious UFS image.
Steps:
- Create a UFS image with a crafted root inode.
- Set inode 2 to type
IFLNKwith a smalldi_size(e.g., 4 bytes). - Embed a symlink target string (e.g., "foo") in the inode.
- Package the image as a
.ufsfile. - Deliver the file to the victim via email, download, or other means.
- When the victim opens the file with NanaZip, the application crashes.
Proof-of-Concept (Python):
import struct
def create_malicious_ufs(filename):
# Minimal UFS superblock (simplified)
superblock = b'\x00' * 1024
# Inode 2 (root) - set type to IFLNK (0xA000) and size to 4
inode2 = struct.pack('<H', 0xA000) # mode: symlink
inode2 += struct.pack('<I', 4) # di_size = 4
inode2 += b'foo\x00' # symlink target
inode2 += b'\x00' * (128 - len(inode2)) # pad to 128 bytes
with open(filename, 'wb') as f:
f.write(superblock)
f.write(inode2)
print(f"Created malicious UFS image: {filename}")
create_malicious_ufs("malicious.ufs")
Note: This is a simplified PoC. A real exploit would require a properly structured UFS image.
Blue Team
Detection:
- Monitor for crashes of NanaZip (process name:
NanaZip.exeor similar). - Use file integrity monitoring to detect unexpected UFS files.
- Educate users not to open UFS files from untrusted sources.
Prevention:
- Apply the patch by updating to NanaZip 6.0.1698.0 or later.
- Use application whitelisting to block untrusted executables.
- Implement endpoint detection and response (EDR) to detect anomalous process behavior.
Indicators of Compromise (IOCs)
- File Hashes (SHA-256): (Example – actual hash depends on crafted file)
malicious.ufs:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- File Names:
*.ufsfiles with unusual size (e.g., < 1 KB) - Process Behavior: NanaZip process crashes with access violation reading address 0x00000000
- Network: No network indicators (local vulnerability)
Detection Engineering
YARA Rule
rule CVE_2026_42442_NanaZip_UFS_Null_Pointer {
meta:
description = "Detects malicious UFS files exploiting CVE-2026-42442"
author = "Valters IT"
date = "2026-01-01"
reference = "CVE-2026-42442"
strings:
$ufs_magic = { 53 19 01 00 } // UFS magic number (example)
$symlink_mode = { 00 A0 } // IFLNK mode (little-endian)
condition:
$ufs_magic at 0 and $symlink_mode at 1024 // inode 2 offset
}
Sigma Rule
title: NanaZip Crash Due to Malicious UFS File
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects NanaZip process crashes caused by CVE-2026-42442
author: Valters IT
date: 2026-01-01
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\NanaZip.exe'
ExitCode: -1073741819 // 0xC0000005 (access violation)
condition: selection
falsepositives:
- Other crashes unrelated to this CVE
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2026-42442 - Malicious UFS File Download"; flow:to_client; file.name:/.*\.ufs/; file.size:<1024; content:"|53 19 01 00|"; offset:0; content:"|00 A0|"; offset:1024; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate:
- Update NanaZip to version 6.0.1698.0 or later.
- If update is not possible, avoid opening UFS files from untrusted sources.
Long-term:
- Implement input validation in file parsers to check inode types.
- Use fuzzing to discover similar vulnerabilities.
- Monitor for new CVEs related to NanaZip.
Workaround:
- Disable UFS support in NanaZip if not needed (if configurable).
Valters IT
Securing Digital Frontiers