CVE-2026-51568 in Agentscopeinfo

Summary

by MITRE • 10/01/2026

modelscope Agentscope v1.0.18-v1.0.0 is vulnerable to Path Traversal in write_text_file.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 10/01/2026

The vulnerability identified in ModelScope AgentScope versions ranging from 1.0.18 through 1.0.0 constitutes a critical path traversal flaw within the write_text_file function. This security defect arises from insufficient validation of user-supplied input when constructing file paths for writing operations. In typical software architecture, functions designed to create or modify text files must sanitize filenames and directory structures provided by external sources to prevent attackers from manipulating the intended destination location on the host system's filesystem. When such sanitization is absent or flawed, an adversary can exploit this weakness to write arbitrary content into sensitive areas of the operating system that are outside the application's designated working directories.

From a technical perspective, this issue aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory. The core mechanism involves the injection of directory traversal sequences, such as dot-dot-slash characters, into the filename parameter passed to the write_text_file function. By carefully crafting these input strings, an attacker can navigate up the directory hierarchy from the intended safe zone and target critical system files or configuration directories. This capability allows for unauthorized file creation or modification in locations where the application does not have explicit permission but which may be accessible due to broader filesystem permissions or misconfigurations on the host machine.

The operational impact of this vulnerability is severe, particularly in environments where AgentScope applications run with elevated privileges or handle sensitive data processing pipelines. An attacker who successfully exploits this path traversal flaw can overwrite system configuration files, inject malicious scripts into executable directories, or corrupt critical application state files. This could lead to a complete compromise of the underlying host environment, resulting in unauthorized access, data exfiltration, or service disruption. In cloud-native deployments where AgentScope might be containerized but shares volume mounts with other services, this vulnerability can serve as an escape vector from the container boundary into the broader infrastructure, potentially affecting neighboring containers or shared storage resources.

This flaw is also relevant to MITRE ATT&CK techniques related to Defense Evasion and Persistence, specifically those involving file system manipulation for establishing footholds or modifying configurations to maintain access. The ability to write files outside of expected directories facilitates lateral movement within a network if the compromised host serves as a pivot point. Furthermore, because AgentScope is often used in automated agent workflows that may process untrusted inputs from various sources including web interfaces or message queues, the attack surface for triggering this vulnerability is significantly expanded compared to isolated desktop applications.

To mitigate this risk, developers must implement strict input validation and canonicalization of file paths before any write operations are executed. This involves resolving the full path of the intended destination and verifying that it resides within an approved base directory using absolute path comparisons rather than simple string matching. Additionally, employing least-privilege principles for the application runtime environment ensures that even if a traversal attempt succeeds, the process lacks the necessary permissions to modify critical system files. Regular security audits focusing on file I/O operations and the use of static analysis tools configured to detect CWE-22 patterns are recommended to identify similar issues across the codebase before deployment in production environments.

Responsible

MITRE

Reservation

06/08/2026

Disclosure

10/01/2026

Moderation

accepted

EPSS

0.00407

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!