What happened
On 17 November 2026, malicious versions of agent-framework were published on PyPI.
| Version | Status |
|---|---|
| 1.26.0 | Last clean version before the attack |
| 1.26.1 | Malicious |
| 1.26.2 | Malicious |
They were published between about 20:35 and 21:08 UTC. PyPI had removed both by about 21:20. Orca says agent-framework-core and 22 other related packages were not affected. When Orca published its report on 18 November, the attack had no CVE. Orca's report does not say how the attacker got access to publish the package.
What a .pth file does
Python reads .pth files in site-packages when it starts. Most of them add a folder to Python's search path. But if a line starts with import followed by a space or tab, Python runs that line.
Some real packages use this feature, so a .pth file is not proof of malware. In this attack, it meant that:
- The malware ran whenever Python started in that environment.
- Your code did not need to import
agent_framework. - Reviewing the package's main code could miss it. In 1.26.2, the attacker even restored the original
__init__.pyfile.
Check without starting Python
Be careful here: pip show and pip list start Python. In an affected environment, that could run the malware again. Search the files instead. On a computer that may be affected, isolate it first and follow your incident response process.
# Change these paths to match your systems
find /usr /opt /home /srv -type f \
\( -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' \) \
-print 2>/dev/null
# Find installed package records without using pip
find /usr /opt /home /srv -type d \
\( -name 'agent_framework-1.26.1.dist-info' \
-o -name 'agent_framework-1.26.2.dist-info' \) \
-print 2>/dev/nullSearch your lockfiles too:
git grep -nE 'agent[-_]framework([^-_a-zA-Z]|$)' -- \ '*requirements*.txt' '*poetry.lock' '*uv.lock' '*Pipfile.lock'
Check each result for 1.26.1 or 1.26.2. Also check container images, CI caches, package mirrors and build logs. If a loose rule such as agent-framework>=1.26 was installed during that time, it may have picked a bad version even if your repository never names it.
In network logs, look for connections to webhook.site and the user agents af-runtime-diagnostics/1 and runtime-diagnostics/1. Many people use webhook.site for normal testing, so check which process made the connection.
What it tried to steal
- Environment variables with names linked to secrets, including from other processes it could read.
- Azure managed identity tokens and Azure DevOps tokens.
- GitHub Actions OIDC tokens. This was only in 1.26.2 and needed a workflow with
id-token: write. - Files that can hold credentials, such as
.env,.npmrc,pip.conf,.netrc,.git-credentialsand Docker, Azure CLI and Hugging Face files.
It also asked for new cloud tokens. Checking only for secrets saved on disk is not enough.
If a bad version ran
- Isolate the computer or CI runner and keep the evidence.
- Rebuild it from a clean image. Do not just uninstall the package.
- Block both bad versions in your package proxy. Check with Microsoft for the current recommended version. Orca's report recommends 1.26.0 with hash checks.
- From a clean computer, rotate every credential the process could reach.
- Review Entra ID sign-ins, Azure DevOps audit logs and GitHub Actions runs from 17 November onwards.
Use hashes in your builds
A lockfile with hashes stops a build from quietly using a different file:
python -m pip install --require-hashes -r requirements.txt
This only helps if you locked a safe version. If someone updates the lockfile after a bad release, it will contain the hash of the bad file. Using a waiting period for new releases lowers that risk.
What scanners can and cannot find
SCA usually compares package versions with lists of known problems. It may not know about a new malicious release for the first few hours, and it might not see one if there is no lockfile. Malware checks look at the code, but they can miss new tricks. Neither one can show which credentials were stolen.
Sources
Look for malicious code in your repositories
AquilaX malware scanning looks for backdoors, hidden code and signs of malicious dependencies. It is included in Ultimate.
See malware scanning →