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-104081 Overview
CVE-2026-104081 is a path traversal vulnerability [CWE-22] in KodExplorer versions before 4.55. The flaw resides in the unzip_pre_name() function within app/function/helper.function.php. A single non-recursive str_replace() sanitization pass can be bypassed using crafted filenames such as ....//. The weakness is compounded by PclZip's extract() call in KodArchive.class.php lacking the PCLZIP_OPT_EXTRACT_DIR_RESTRICTION option. Authenticated attackers can upload a malicious ZIP archive containing traversal sequences to overwrite arbitrary files on the host.
Critical Impact
Attackers can overwrite core JavaScript assets to achieve stored cross-site scripting (XSS), take over administrator accounts, and gain remote code execution through unrestricted PHP file upload.
Affected Products
- KodExplorer versions prior to 4.55
- Deployments using the vulnerable unzip_pre_name() sanitization logic
- Instances relying on PclZip extraction without directory restriction
Discovery Timeline
- 2026-10-09 - CVE-2026-104081 published to NVD
- 2026-10-09 - Last updated in NVD database
Technical Details for CVE-2026-104081
Vulnerability Analysis
The vulnerability arises from flawed sanitization in KodExplorer's ZIP extraction workflow. The unzip_pre_name() function performs a single-pass str_replace() call to strip traversal sequences from archive member names. Attackers bypass the filter using overlapping patterns such as ....//, which collapse into ../ after the one-time replacement completes. The resulting path escapes the intended extraction directory.
Extraction is handled by KodArchive.class.php, which invokes PclZip's extract() method without supplying the PCLZIP_OPT_EXTRACT_DIR_RESTRICTION option. Without this safeguard, PclZip writes files to any absolute or relative path contained in the archive. The combination allows authenticated users to overwrite arbitrary files served by the web application.
Post-exploitation, an attacker overwrites core JavaScript assets consumed by administrators. Loading the tampered script triggers stored XSS in an authenticated admin session. Session theft or forced actions then enable account takeover, after which the attacker uses KodExplorer's unrestricted upload capability to deploy a PHP webshell for remote code execution.
Root Cause
The root cause is incomplete input validation. A non-recursive string replacement cannot neutralize nested traversal tokens, and the archive library is invoked without the directory restriction option that would enforce extraction boundaries.
Attack Vector
Exploitation requires authenticated access to the KodExplorer file manager. The attacker uploads a ZIP archive containing filenames with crafted traversal sequences. The server extracts the archive and writes attacker-controlled content outside the intended target directory. See the Vulncheck Path Traversal Advisory for additional technical context.
No verified exploit code available. Refer to the Vulncheck advisory
for the full technical write-up of the str_replace() bypass and
PclZip extraction behavior.
Detection Methods for CVE-2026-104081
Indicators of Compromise
- Uploaded ZIP archives containing filenames with sequences such as ....//, ..\/, or other overlapping traversal patterns
- Unexpected modifications to KodExplorer JavaScript assets under the web root
- New or modified PHP files in upload or asset directories without a corresponding administrative change
- Administrator session activity originating from unfamiliar IP addresses following script asset modification
Detection Strategies
- Inspect archive uploads at the application or proxy layer and reject member names containing traversal tokens after recursive normalization
- Monitor file integrity of static web assets, especially JavaScript files served to administrators
- Correlate ZIP upload events with subsequent write operations outside the configured extraction directory
Monitoring Recommendations
- Log all authenticated upload and extraction events with full filename metadata
- Alert on PHP file creation inside directories intended for user content or static assets
- Review web server access logs for stored XSS indicators such as unexpected outbound requests from admin browsers
How to Mitigate CVE-2026-104081
Immediate Actions Required
- Upgrade KodExplorer to version 4.55 or later as published in the GitHub Release 4.55
- Restrict file manager access to trusted authenticated users until the patch is deployed
- Audit the web root for unauthorized modifications to JavaScript and PHP files
- Rotate administrator credentials and invalidate active sessions if compromise is suspected
Patch Information
The vendor fix is included in KodExplorer 4.55. The release corrects the unzip_pre_name() sanitization logic and hardens the PclZip extraction call. Review the release notes in the GitHub Release 4.55 before deployment.
Workarounds
- Disable archive upload and extraction features for non-administrative users until patching is complete
- Place the KodExplorer web root on a filesystem mount with restrictive permissions to limit cross-directory writes
- Deploy a web application firewall rule that blocks multipart uploads containing ZIP members with traversal sequences
# Example WAF-style check: reject ZIP uploads with traversal filenames
unzip -l suspicious.zip | awk '{print $4}' | \
grep -E '(\.\.[\\/]|\.{3,}[\\/])' && \
echo "BLOCK: traversal sequence detected"
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

