GitHub Security and PyPI quarantine backdoored AI agent-framework package stealing cloud and developer tokens
· GitHub
GitHub reported that two compromised versions of the agent-framework Python package contained credential stealers. The malicious code ran automatically on Python startup to steal developer secrets.
Key numbers
- agent-framework PyPI package targeted
- .pth Hook Auto-runs on Python startup
- Token Exfiltration OpenAI, GitHub & cloud keys
What was published
Anyone who installed agent-framework versions 1.26.1 or 1.26.2 should treat their environment as exposed and rotate all accessible secrets immediately.
GitHub published an advisory disclosing malicious releases of the agent-framework package on PyPI. Versions 1.26.1 and 1.26.2 were uploaded on 2026-11-17 and later taken down. The last clean release remains 1.26.0.
The compromised packages placed an infostealer that triggered automatically whenever Python launched, even if agent_framework was never imported. Attackers used executable startup hooks: agent_framework_meta.pth in version 1.26.1 and af_runtime_diag.pth in version 1.26.2. The injected script detached into a background process using os.fork and muted runtime errors to hide its activity.
What was stolen
The background process gathered system details, process memory, and local configuration files before exfiltrating the data via HTTP POST to an external webhook. Targeted assets included:
- Environment variables matching strings such as
OPENAI,GITHUB,AZURE,AWS,TOKEN,KEY, andPASSWORD - Process memory accessed via
/proc/*/environand stored files including.git-credentials,.netrc,.npmrc, and.docker/config.json - Cloud credentials, including Azure instance metadata tokens and Azure DevOps OIDC tokens
- GitHub Actions runner paths and OIDC tokens, introduced in version 1.26.2, which expanded the harvested file limit from 60 to 80
Source: https://github.com/advisories/GHSA-764m-3ppc-5m73
Tags: Agentic AI, Credential Theft, GitHub, Microsoft, PyPI, Python, Supply chain