CVE-2026-51568: modelscope Agentscope path traversal in write_text_file

CVE-2026-51568 · Severity: high · CVSS 8.1 · Published 2026-09-30

Agentscope is a Python library used for building agent-based applications. An attacker can exploit a path traversal vulnerability in the write_text_file function to write files outside the intended storage boundary, potentially overwriting system files or injecting malicious content into the application's runtime environment.

Vendors: Modelscope.

Quick answers

Is CVE-2026-51568 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-51568 being exploited in the wild.
How severe is CVE-2026-51568?
High severity, with a CVSS score of 8.1, published 30 September 2026.
Which products and versions are affected?
Modelscope Agentscope 1.0.18-1.0.19.post1.
Is there a fix for CVE-2026-51568?
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-51568 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-51568?
Check whether you run Modelscope Agentscope 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

The write_text_file function in src/agentscope/tool/_text_file/_write_text_file.py fails to properly validate file path inputs, allowing directory traversal sequences (e.g., ../). An attacker with the ability to call this function can write arbitrary files to locations outside the intended workspace. No authentication or special privileges are required beyond the ability to invoke the vulnerable function.

Affected products

  • modelscope Agentscope 1.0.18-1.0.19.post1

Timeline

  • 2026-09-30: disclosed

References

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