MS-Agent Vulnerability CVE-2026-2256 Allows Arbitrary Command Execution

Summary
CVE-2026-2256 lets crafted content consumed by ModelScope MS-Agent bypass Shell tool checks and trigger arbitrary commands with the agent process’s privileges. The flaw was found in version 1.5.2; recommended mitigations include sandboxing and least privilege.
Key points
- CVE-2026-2256 affects the MS-Agent Shell tool, which uses an unsafe regex-based blacklist to filter commands.
- Crafted prompts, documents, logs, or other agent inputs can steer the agent into issuing attacker-influenced shell commands without direct shell access.
- The flaw can bypass command checks and execute commands with the privileges of the MS-Agent process.
- Potential consequences include reading secrets, dropping payloads, establishing persistence, and pivoting to internal services; full host compromise is a potential outcome.
- The vulnerability was discovered in MS-Agent version 1.5.2; the vendor had not responded during coordination efforts, according to a CERT/CC advisory.
- Recommended mitigations include using trusted or sanitized input, sandboxing agents with shell access, applying least privilege, and replacing denylists with strict allowlists.
Article Details
- Vulnerability Types
- OS command injection
- Affected Versions
- MS-Agent 1.5.2
- Exploitation Status
- reported
- Exploit Availability
- unknown
- Patch Status
- unknown
- Workarounds
- Use MS-Agent only with trusted, validated, or sanitized ingested content.
- Sandbox agents with shell execution or run them with least-privilege permissions.
- Replace denylist-based filtering with strict allowlists and strengthen isolation boundaries for tool execution.
