ZimaOS Arbitrary File Write via Unvalidated File API Path — CVE-2026-28286
by Rushi9 (Rushikesh Kaware) · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-28286
- Category
- web
- Affected product
- ZimaOS (NAS / home-server operating system), file API endpoint /v2_1/files/file
- Affected versions
- Not specified in source
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-04 |
| Author / Researcher | Rushi9 (Rushikesh Kaware) |
| CVE / Advisory | CVE-2026-28286 |
| Category | web |
| Severity | Critical |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | zimaos, nas, arbitrary-file-write, path-traversal, api-misconfiguration, rce, home-server |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | ZimaOS (NAS / home-server operating system), file API endpoint /v2_1/files/file |
| Versions Affected | Not specified in source |
| Language / Platform | Python 3 (requests-based CLI PoC toolkit) |
| Authentication Required | No (bearer token supported optionally, but not required to trigger) |
| Network Access Required | Yes |
Summary
ZimaOS exposes a file-management REST API endpoint (/v2_1/files/file) that accepts a user-supplied file path without canonicalizing it or restricting it to a base directory. Because this is a web-facing REST API rather than a local system call, an attacker able to reach the API can write arbitrary files anywhere on the underlying filesystem, including outside the intended storage directory (e.g. /etc, /usr/local/bin). The included toolkit is an HTTP-based scanner/exploiter (single target, batch mode, proxy support) that confirms the flaw and writes a proof file to attacker-chosen paths, demonstrating a path from API misconfiguration to arbitrary file write and potential full system compromise via config/script overwrite.
Vulnerability Details
Root Cause
The /v2_1/files/file API endpoint fails to canonicalize or validate user-supplied file paths and does not enforce a base-directory restriction, allowing absolute, attacker-controlled paths to be written to disk.
Attack Vector
- Send a request to the ZimaOS file API (
/v2_1/files/file) with an attacker-chosen absolute path (default demonstrated with/tmp, extendable to/etc,/usr/local/bin, etc.). - The backend writes the supplied content to that path without restricting it to the intended storage directory.
- Verify success by listing/reading back the written file at the target path.
- Escalate by overwriting sensitive configuration files, cron jobs, or startup scripts to achieve privilege escalation or remote code execution.
Impact
Arbitrary file write on the NAS/home-server host, which can be leveraged to overwrite configuration files or scripts and escalate to full system compromise (RCE).
Environment / Lab Setup
Target: ZimaOS instance with the file management API reachable (e.g. http://localhost:8080)
Attacker: Python 3, `requests`, optional Burp Suite proxy for request inspection
Proof of Concept
PoC Script
See
poc.pyand thecore/module (client.py,runner.py,utils.py,verifier.py) in this folder.
| |
Sends a crafted request to the vulnerable file API to write a uniquely-named proof file to the specified path, then verifies the write succeeded; supports single-target, batch (-t targets.txt), proxy, bearer-token, and repeated-attempt modes.
Detection & Indicators of Compromise
Signs of compromise:
- Unexplained files written outside the normal NAS storage/share directories.
- Modified system configuration files or startup scripts with recent unexplained mtimes.
- Repeated requests to
/v2_1/files/filewith absolute or traversal-style paths in access logs.
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 — monitor for advisory |
| Interim mitigation | Restrict the file API to a canonicalized allow-listed base directory, reject absolute/traversal paths, and require authentication for all file-write operations. |
References
Notes
Mirrored from https://github.com/Rushi9/zimaos-cve-2026-28286-arbitrary-file-write on 2026-07-05.
| |