Osegi
Security·2 min read

ONNX Runtime vanishes from GitHub as malware hits PyPI

Microsoft's onnxruntime repo returns 404 on GitHub, and the same evening two poisoned agent-framework releases hit PyPI. Nobody has said whether the two are linked.

A GitHub repository page showing a 404 error next to a warning icon over Python package code.
Image: Хабр

If your build broke today, or a dependency bot is throwing 404 errors, the cause may be the same. Since the evening of 17 November, GitHub has not served the microsoft/onnxruntime repository: no code, no tags, no release archives.

The same evening, two versions of Microsoft's agent-framework package appeared on PyPI with an information stealer inside, and were removed within about an hour. Whether the events are connected has not been confirmed. As of the morning of 18 November, neither Microsoft nor GitHub has made a statement.

What is ONNX Runtime and what is missing?

ONNX Runtime is Microsoft's engine for running neural networks saved in the open ONNX format, on CPUs, GPUs, phones and in the browser. The onnxruntime package was downloaded 141 million times from PyPI in the last month, according to pypistats. Many C, C++, Rust and Go projects instead pull prebuilt archives from GitHub Releases, and that is exactly what now fails.

Seven other Microsoft repositories return the same 404, including onnxruntime-genai, onnxruntime-extensions and agent-framework. The rest of the organisation works normally, the GitHub status page shows no incident, and onnxruntime.ai loads. That suggests these repos were switched off deliberately, not that the platform broke. The ONNX Runtime packages on PyPI, NuGet and npm remain available, and researchers have not reported malicious code in them.

What did the malicious agent-framework do?

Versions 1.26.1 and 1.26.2 were published to PyPI at 20:35 and about 21:08, and both were gone by 21:30, according to security firm Wiz. The package has roughly 200,000 downloads a month. The versions had no matching tag in Microsoft's repository, which suggests they were built outside the normal release process.

They dropped a .pth file into site-packages. Python runs such files at startup, so any Python launch in that environment triggered the code. It harvested environment variables containing words like TOKEN, SECRET, AWS or GITHUB, searched for credential files such as .npmrc, .git-credentials and Docker config, and requested Azure identity tokens. Version 1.26.2 could also grab GitHub Actions OIDC tokens. The loot was sent to a free webhook.site address. Wiz counted no more than 50 submissions.

If either version was installed, treat every secret in that environment as compromised.

A popular guess on Hacker News is that Microsoft hid the repositories while it works out how the attacker got publishing access. That is speculation, not a confirmed fact.

Apps worth a look

SUMO: the number puzzle

Tap the right tiles, add them up, hit the target. Easy to learn, hard to master. Free, for all ages.

Tags:onnx runtimegithubmicrosoftpypiagent-frameworksupply chain

More from this day

See all →

More in: Security

See all →