Malicious agent-framework PyPI Releases Target Developer and CI Credentials

Summary
OpenSourceMalware reports that agent-framework versions 1.26.1 and 1.26.2 contain a stealer that runs at Python startup, collects credentials and requests CI/cloud tokens, then sends data to a UUID-specific webhook.site URL.
Key points
- The article identifies PyPI versions 1.26.1 and 1.26.2 as malicious releases published through Microsoft's PyPI publisher account.
- A .pth file runs the stealer during ordinary Python startup without requiring the package to be imported; the article says this is not operating-system persistence.
- The malware searches environment variables, credential files and other processes' environments for secrets.
- It requests fresh GitHub Actions OIDC, Azure DevOps OIDC and Azure managed identity tokens when the relevant runtime endpoints and credentials are available.
- Collected data is compressed, Base64-encoded and sent by HTTPS POST to a UUID-specific path on webhook[.]site.
- The article recommends locating affected installs, rebuilding environments, rotating exposed credentials, revoking runtime credentials and reviewing Azure activity.
Article Details
- Attack Vectors
- Malicious agent-framework versions 1.26.1 and 1.26.2 were published through Microsoft's official PyPI publisher account.
- A .pth file in the package imports af_runtime_diag during Python startup, causing the stealer to run without the package being imported.
- The stealer collects secrets from environment variables, credential files, and other processes' environments, and requests fresh GitHub Actions, Azure DevOps, and Azure managed identity tokens.
- Collected data is compressed, Base64-encoded, and sent by HTTPS POST to a UUID-specific webhook.site URL.
- Defensive Notes
- Treat installations of agent-framework 1.26.1 or 1.26.2 as credential compromises; isolate affected systems and stop compromised CI/CD jobs or runners.
- Search dependency manifests, caches, build logs, and Python environments for the affected versions; inspect site-packages for af_runtime_diag.pth, af_runtime_diag.py, and unexpected executable .pth lines.
- Rebuild affected environments from known-good dependencies and images, rotate exposed credentials, revoke GitHub Actions and Azure DevOps runtime credentials, and invalidate OIDC-derived sessions where possible.
- Review Azure activity for use of managed identities and tokens tied to affected workloads, and check network telemetry for requests to the UUID-specific webhook path.
Indicators of compromise
| Type | Indicator | Context |
|---|---|---|
| SHA256 | 325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93 | SHA-256 of af_runtime_diag.pth, the malicious Python startup file in the package. |
| SHA256 | 54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f | SHA-256 of af_runtime_diag.py, the credential-stealing module in the package. |
| URL | hxxps[:]//webhook[.]site/d381fd80-ec62-42ad-8f5c-d1b15103c9bb?t=telemetry | Specific webhook.site URL identified as the HTTPS POST destination for exfiltrated data. |
MITRE ATT&CK
T1057 · Process DiscoveryThe stealer reads /proc/<pid>/environ files to inspect other processes' environments for secrets.T1059.006 · PythonThe .pth file executes a Python import that loads the credential-stealing module.T1083 · File and Directory DiscoveryThe stealer checks hard-coded paths and glob patterns for credential files, reading matching files.T1528 · Steal Application Access TokenThe stealer requests fresh GitHub Actions and Azure DevOps OIDC tokens and Azure managed identity tokens for exfiltration.T1546.017 · Udev RulesThe package's .pth file imports af_runtime_diag during Python startup, triggering the stealer automatically.T1552.001 · Credentials In FilesThe stealer searches credential files, including pip, Git, Docker, and cloud configuration files, for secrets.T1552.005 · Cloud Instance Metadata APIThe stealer queries Azure managed identity endpoints and, if needed, the Azure Instance Metadata Service for tokens and instance metadata.T1567.004 · Exfiltration Over WebhookThe stealer sends collected data by HTTPS POST to a UUID-specific webhook.site URL.
Vendors
Products
Azure DevOpsand other processes' environments for secrets. Then it goes further and requests fresh GitHub Actions, Azure DevOps and Azure managed identity tokens, and sends everything to a webhook.site URL hidden in the source asGitHub Actionsfiles and other processes' environments for secrets. Then it goes further and requests fresh GitHub Actions, Azure DevOps and Azure managed identity tokens, and sends everything to a webhook.site URL hidden inMicrosoft Agent FrameworkThe OpenSourceMalware team discovered two malicious releases of Microsoft's agent-framework package on PyPI, versions 1.26.1 and 1.26.2. Both add a credential stealer that runs automatically whenever Python starts inPythonon PyPI, versions 1.26.1 and 1.26.2. Both add a credential stealer that runs automatically whenever Python starts in the affected environment, without anyone importing the package.
