Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-112302 Overview
CVE-2026-112302 is a path traversal vulnerability in the kiwilan/php-archive library versions up to 2.3.02. The flaw resides in the ArchiveZip::extract function within src/Readers/ArchiveZip.php, part of the Extraction component. An attacker can craft a ZIP archive with manipulated entry names to write files outside the intended extraction directory. The attack is exploitable remotely and a public proof-of-concept exists. The vendor was contacted prior to disclosure but did not respond. The weakness is classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).
Critical Impact
Attackers can write arbitrary files to locations outside the designated extraction directory by supplying a malicious ZIP archive, potentially leading to code execution when extracted files overwrite application assets.
Affected Products
- kiwilan php-archive versions up to and including 2.3.02
- Applications embedding the ArchiveZip reader from src/Readers/ArchiveZip.php
- PHP projects that process untrusted ZIP input through the library's extract function
Discovery Timeline
- 2026-10-19 - CVE-2026-112302 published to NVD
- 2026-10-22 - Last updated in NVD database
Technical Details for CVE-2026-112302
Vulnerability Analysis
The vulnerability affects the ArchiveZip::extract function in kiwilan/php-archive. The function iterates over entries in a user-supplied ZIP archive and writes each entry to disk relative to a destination directory. The implementation does not normalize or validate the entry filename before concatenating it with the output path. An attacker who can submit a ZIP file to a vulnerable application triggers unauthorized file writes outside the extraction root.
Exploitation requires user interaction, such as uploading or opening a crafted archive. Successful exploitation yields limited impact on confidentiality, integrity, and availability. The practical risk escalates when extracted files land in web-reachable or executable paths. Writing to configuration files, cron directories, or PHP sources can convert a file-write primitive into code execution.
Root Cause
The root cause is missing sanitization of ZIP entry names inside ArchiveZip::extract. ZIP archives can embed path components such as ../ or absolute paths in entry filenames. The library trusts these names and passes them directly to filesystem write operations. This is the canonical "Zip Slip" pattern tracked under CWE-22.
Attack Vector
An attacker crafts a ZIP archive containing entries with traversal sequences in their names, for example ../../../../var/www/html/shell.php. The attacker delivers the archive to any endpoint that invokes ArchiveZip::extract on uploaded content. When the application extracts the archive, the library resolves the traversal and writes the attacker-controlled file to the resulting path. Technical details and a working proof-of-concept are published in the GitHub Gist PoC and documented at VulDB CVE-2026-112302.
Detection Methods for CVE-2026-112302
Indicators of Compromise
- Files created outside the intended extraction directory following ZIP processing operations by PHP processes.
- ZIP archives containing entry names with ../ sequences, backslashes, or absolute paths detected in upload directories.
- Unexpected .php, .htaccess, or configuration files appearing in webroot shortly after archive upload events.
- Web server processes writing to directories outside the application's configured upload or temp paths.
Detection Strategies
- Scan dependency manifests (composer.json, composer.lock) for kiwilan/php-archive at or below version 2.3.02.
- Instrument file-write syscalls originating from PHP-FPM or CLI PHP workers and alert when target paths escape the extraction base directory.
- Inspect ZIP uploads at the WAF or application layer and reject archives whose central directory contains entries with traversal metacharacters.
- Correlate ZIP extraction events with subsequent process execution or new executable files in webroots.
Monitoring Recommendations
- Enable file integrity monitoring across webroots, PHP include paths, and system cron directories.
- Log and retain the names of all entries extracted by archive-processing libraries for post-incident review.
- Monitor outbound connections from PHP workers that follow archive uploads, which may indicate webshell activation.
How to Mitigate CVE-2026-112302
Immediate Actions Required
- Inventory all applications depending on kiwilan/php-archive and identify versions at or below 2.3.02.
- Disable or gate ZIP extraction functionality exposed to untrusted users until a patched release is available.
- Isolate upload and extraction directories on non-executable mounts with the noexec flag where supported.
- Review webroots and recent audit logs for files written outside expected extraction paths.
Patch Information
At the time of publication, no vendor patch has been confirmed. The VulDB entry notes that the vendor was contacted early about this disclosure but did not respond. Monitor the project's repository and VulDB CVE-2026-112302 advisory for updates. Until a fixed release is published, consumers should apply the workarounds below or replace the dependency with a maintained alternative.
Workarounds
- Wrap ArchiveZip::extract calls with a validator that rejects entry names containing .., leading /, or drive letters before writing to disk.
- Resolve each extraction target with realpath and verify it begins with the canonical extraction directory before any write.
- Enforce size, entry-count, and filename-length limits on uploaded archives to reduce exploitation surface.
- Run archive extraction inside a chrooted or containerized process with least-privilege filesystem access.
# Configuration example
# Identify vulnerable installs via Composer
composer show kiwilan/php-archive
# Mount upload directory as noexec to blunt webshell execution
mount -o remount,noexec,nosuid /var/www/uploads
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

