CVE-2026-51851: ModelScope agent-zero directory traversal in file_browser.save_text_file

CVE-2026-51851 · Severity: info · Published 2026-10-29

ModelScope agent-zero is an AI agent framework that handles file operations on a host system. The save_text_file method fails to properly validate user-supplied file paths, allowing attackers to write arbitrary files anywhere on the system—including critical configuration and executable files. This could enable remote code execution or system compromise.

Vendors: Modelscope.

Quick answers

Is CVE-2026-51851 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-51851 being exploited in the wild.
How severe is CVE-2026-51851?
Informational severity, published 29 October 2026.
Which products and versions are affected?
Modelscope Agent-Zero 1.7, 1.8, 1.9, 1.10.
Is there a fix for CVE-2026-51851?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-51851 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-51851?
Check whether you run Modelscope Agent-Zero at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A directory traversal vulnerability exists in python/helpers/file_browser.py:FileBrowser.save_text_file, where user-controlled file paths are insufficiently validated before file write operations. The path-checking logic can be bypassed when base_dir is set to "/" or through crafted traversal sequences. An unauthenticated remote attacker can exploit this via the /edit_work_dir_file HTTP endpoint to write arbitrary files to the host filesystem.

Affected products

  • ModelScope agent-zero 1.7, 1.8, 1.9, 1.10

Timeline

  • 2026-04-20: disclosed
  • 2026-10-29: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.