Vulnerabilities in pkg:pypi/ms-agent

PACKAGE
Advisory Identifier: GHSA-4gc2-344q-r2rw
Advisory Summary

CVE-2026-2256 is a MODERATE (CVSS 6.5) ms-agent vulnerable to command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Ms agent libraries in the PyPI ecosystem. The issue involves ms-agent vulnerable to command injection. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/ms-agent

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/ms-agent. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-4gc2-344q-r2rw CVE-2026-2256 MODERATE MS-Agent vulnerable to Command Injection

CVE-2026-2256 at a Glance

CVE Identifier CVE-2026-2256
GHSA Identifier GHSA-4gc2-344q-r2rw
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Ms agent
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-2256

To remediate this vulnerability, upgrade all affected Ms agent dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ms-agent fixed: Latest secure release
pip install ms-agent>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show ms-agent

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-2256, inspect your installed packages using pip:

pip show ms-agent

Analyze the terminal output to locate any version of Ms agent in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show ms-agent command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Ms agent, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A Command Injection vulnerability in ModelScope's MS-Agent versions v1.6.0rc1 and earlier exists, allowing an attacker to execute arbitrary operating system commands through crafted prompt-derived input.

CVE-2026-2256 Affected Ms agent Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
ms-agent
PyPI
≤ 1.6.0rc1

References

Frequently Asked Questions

What is CVE-2026-2256?
CVE-2026-2256 is a security vulnerability in Ms agent involving MS-Agent vulnerable to Command Injection under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Ms agent versions are affected?
Affected versions include releases prior to current release patches across affected packages: ms-agent.
What version fixes CVE-2026-2256?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is ms-agent affected?
Yes, ms-agent is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-2256?
CVE-2026-2256 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-2256?
CVE-2026-2256 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2026-2256?
Run the dependency tree command: 'pip show ms-agent'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4gc2-344q-r2rw",
  "modified" : "2026-03-04T21:14:09Z",
  "published" : "2026-03-02T21:31:32Z",
  "aliases" : [ "CVE-2026-2256" ],
  "summary" : "MS-Agent vulnerable to Command Injection",
  "details" : "A Command Injection vulnerability in ModelScope's MS-Agent versions v1.6.0rc1 and earlier exists, allowing an attacker to execute arbitrary operating system commands through crafted prompt-derived input.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ms-agent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.6.0rc1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-2256"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Itamar-Yochpaz/CVE-2026-2256-PoC"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/modelscope/ms-agent"
  }, {
    "type" : "WEB",
    "url" : "https://medium.com/@itamar.yochpaz/cve-2026-2256-from-ai-prompt-to-full-system-compromise-a4114c718326"
  }, {
    "type" : "WEB",
    "url" : "https://www.hiddenlayer.com/research/indirect-prompt-injection-of-claude-computer-use"
  }, {
    "type" : "WEB",
    "url" : "https://www.kb.cert.org/vuls/id/431821"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-04T21:14:09Z",
    "nvd_published_at" : "2026-03-02T21:16:27Z"
  }
}