CVE-2016-2335
High · 8.8CVSS
8.8
EPSS
9.8%
Published
Jun 7, 2016
CISA due date
—
Cloudanix analysis
A bug in popular archive software lets attackers take control of a computer simply by getting a user to open a specially crafted file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds read in CInArchive::ReadFileItem when parsing the PartitionRef field of a Long Allocation Descriptor inside a UDF image, resulting in memory corruption that can be leveraged for denial of service or arbitrary code execution.
Why it matters to the business
Attackers can crash archive-extraction processes or obtain code execution on systems that handle untrusted UDF files, increasing risk of malware deployment and data theft on developer and operations workstations that routinely unpack archives.
How an attack unfolds
An attacker builds a UDF image containing a Long Allocation Descriptor with an out-of-range PartitionRef value, then delivers the file through email, web download, or shared storage. When a victim opens the archive with a vulnerable 7-Zip or p7zip build, the parser dereferences invalid memory, enabling control-flow hijacking or a crash.
How to fix it
Upgrade 7-Zip to a current release that contains the corrected UdfIn.cpp logic and p7zip to an equivalent patched build; disable UDF support or archive extraction from untrusted sources until patches are applied.
How to confirm the fix worked
Confirm installed 7-Zip or p7zip version is newer than the affected releases, run the application against known-good and known-malicious UDF test files, and verify that no crash or unexpected memory access occurs.
Typical attack path
- Construct malicious UDF archive with crafted PartitionRef field
- Host or send the archive to the target environment
- Victim opens the file using vulnerable 7-Zip or p7zip
- Parser triggers out-of-bounds read and memory corruption
- Attacker payload executes or process terminates
How to detect it
Search endpoint and application logs for 7-Zip or p7zip processes that terminate unexpectedly while handling .udf, .iso, or .img files; inspect crash dumps for references to UdfIn.cpp or PartitionRef handling.
- 7z.exe
- 7za.exe
- UdfIn.cpp
- PartitionRef
What your security team should do
- Prioritize immediate upgrade of all 7-Zip and p7zip installations across the estate
- Add UDF file type to email and web-gateway block lists pending remediation
- Hunt for historical 7z.exe or 7za crashes correlated with UDF file opens in endpoint telemetry
- Review archive-handling scripts and CI pipelines for direct use of vulnerable versions
The record
The CInArchive::ReadFileItem method in Archive/Udf/UdfIn.cpp in 7zip 9.20 and 15.05 beta and p7zip allows remote attackers to cause a denial of service (out-of-bounds read) or execute arbitrary code via the PartitionRef field in the Long Allocation Descriptor in a UDF file.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | p7zip | 0 | 15.14.1+dfsg-2 |
| Debian:12 | p7zip | 0 | 15.14.1+dfsg-2 |
| Debian:13 | p7zip | 0 | 15.14.1+dfsg-2 |
| Debian:7 | p7zip | 0 | 9.20.1~dfsg.1-4+deb7u2 |
| Debian:8 | p7zip | 0 | 9.20.1~dfsg.1-4.1+deb8u2 |
| Mageia:5 | p7zip | 0 | 9.20.1-6.2.mga5 |
| SUSE:Linux Enterprise Desktop 12 | p7zip | 0 | 9.20.1-6.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | p7zip | 0 | 9.20.1-6.1 |
| SUSE:Linux Enterprise Server 12 | p7zip | 0 | 9.20.1-6.1 |
| SUSE:Linux Enterprise Server 12 SP1 | p7zip | 0 | 9.20.1-6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | p7zip | 0 | 9.20.1-6.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | p7zip | 0 | 9.20.1-6.1 |
| Ubuntu:14.04:LTS | p7zip | 0 | 9.20.1~dfsg.1-4+deb7u2build0.14.04.1 |
| Ubuntu:16.04:LTS | p7zip | 0 | 9.20.1~dfsg.1-4.2ubuntu0.1 |
| openSUSE:Tumbleweed | p7zip | 0 | 16.02-2.1 |
Related vulnerabilities
- CVE-2025-0411 7-Zip Mark-of-the-Web Bypass Vulnerability. Also affects p7zip
- CVE-2024-11612 7-Zip CopyCoder Infinite Loop Denial-of-Service Vulnerability. Also affects p7zip
- CVE-2023-52168 The NtfsHandler.cpp NTFS handler in 7-Zip before 24.01 (for 7zz) contains a heap-based… Also affects p7zip
- CVE-2023-52169 The NtfsHandler.cpp NTFS handler in 7-Zip before 24.01 (for 7zz) contains an… Also affects p7zip
- CVE-2016-2334 Heap-based buffer overflow in the NArchive::NHfs::CHandler::ExtractZlibFile method in… Also affects p7zip
- CVE-2024-11477 7-Zip Zstandard Decompression Integer Underflow Remote Code Execution Vulnerability. Also affects p7zip
- CVE-2026-112108 A vulnerability was determined in ztxz16 fastllm up to 0.1.8.2. CWE-119
- CVE-2026-112073 A vulnerability was identified in Tencent ncnn up to 44b02dabdcf97499281a4692ebd65bad73dc… CWE-119