[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fyJAmLtuVeFB9Nen0gwEGRsoTNOnJ2Nct5b552Ki44X4":3},{"lesson":4},{"id":5,"slug":6,"article_id":7,"title":8,"body":9,"prevention":10,"framework_refs":11,"framework_notes":17,"status":23,"created_at":24,"published_at":25,"article":26,"tags":30,"podcasts":43,"controls":44},"1bccd06e-276b-48b8-8225-87512069ae54","compromised-pypi-package-delivers-malware-via-microsofts-official-agent-framework","4d7ab95c-2ba8-4e45-99ee-30e16e87cd09","Compromised PyPI Package Delivers Malware via Microsoft's Official Agent Framework","Attackers compromised Microsoft's official Python agent-framework package on PyPI, injecting info-stealing malware into versions 1.26.1 and 1.26.2 that silently exfiltrated environment variables, credentials, and secrets from developer toolchains including Azure, Git, and Docker. This is a classic software supply chain attack: developers trusted an official package source and were unknowingly betrayed at the distribution layer. The malware also actively harvested CI\u002FCD identity tokens from GitHub Actions and Azure DevOps, dramatically expanding the blast radius beyond individual machines to entire pipelines. This incident illustrates why dependency integrity verification and least-privilege secrets management are non-negotiable in modern development environments.","**Immediate actions:**\n- Pin package versions using cryptographic hashes (e.g., `--hash` in pip requirements files) to prevent silent substitution with malicious versions.\n- Audit all environments that installed `microsoft-agent-framework` versions 1.26.1 or 1.26.2 and rotate every exposed credential, token, and secret immediately.\n- Remove overly broad CI\u002FCD identity token scopes and revoke any tokens that may have been exfiltrated during the compromise window.\n\n**Long-term improvements:**\n- Establish a private internal package mirror or proxy (e.g., Artifactory, Azure Artifacts) that enforces allowlisting and integrity checks before packages reach developer machines.\n- Apply the principle of least privilege to all environment variables and secrets in CI\u002FCD pipelines, ensuring tokens are scoped to only the minimum required permissions and short-lived.\n- Implement a formal third-party and open-source dependency review process, including regular audits of transitive dependencies.\n\n**Detection measures:**\n- Deploy software composition analysis (SCA) tools in CI\u002FCD pipelines to flag unexpected package version changes or hash mismatches at build time.\n- Monitor for anomalous outbound network connections from build agents and developer workstations, particularly to unexpected external endpoints during package installation.\n- Enable secret scanning in repositories and CI\u002FCD systems to detect and alert on exposed credentials before they can be exploited.",[12,13,14,15,16],"MITRE ATT&CK T1195.001: Supply Chain Compromise: Compromise Software Dependencies and Development Tools","CIS Control 16: Application Software Security (v8)","NIST SP 800-53 SR-4: Provenance","NIS2 Article 21(2)(d)","NIST CSF 2.0 ID.SC-2: Suppliers and third-party partners of information systems",{"NIS2 Article 21(2)(d)":18,"NIST SP 800-53 SR-4: Provenance":19,"CIS Control 16: Application Software Security (v8)":20,"NIST CSF 2.0 ID.SC-2: Suppliers and third-party partners of information systems":21,"MITRE ATT&CK T1195.001: Supply Chain Compromise: Compromise Software Dependencies and Development Tools":22},"NIS2 Article 21(2)(d) explicitly requires security in supply chain relationships, including controls over software dependencies and third-party components, directly applicable to this PyPI compromise.","SR-4 requires organizations to document and verify the provenance of components in their supply chain, a control that would have mandated integrity checks on the PyPI package before deployment.","CIS Control 16 requires organizations to manage the security of software they use, including verifying the integrity of third-party components, which would have flagged the tampered package versions.","This category requires organizations to identify and assess risks posed by suppliers and third-party software providers, which would have prompted verification controls on the official PyPI package.","This technique specifically covers adversaries injecting malicious code into software packages or dependencies to compromise downstream users, exactly what occurred with the tampered PyPI package.","published","2026-11-18T18:20:40.132015+00:00","2026-11-18T18:20:40.098+00:00",{"id":7,"url":27,"slug":28,"title":29},"https:\u002F\u002Fwww.theregister.com\u002Fsecurity\u002F2026\u002F11\u002F18\u002Fmicrosofts-official-python-agent-framework-hijacked-to-distribute-malware\u002F5310858","microsoft-s-official-python-agent-framework-hijacked-to-distribute-malware-cd1a6b","Microsoft's official Python agent framework hijacked to distribute malware",[31,37],{"id":32,"name":33,"slug":34,"description":35,"color":36},"1ec88fde-2d0f-4ed8-932a-33f5ccc0fdc7","Access Control","access-control","Excessive privileges, missing MFA, weak auth","#f97316",{"id":38,"name":39,"slug":40,"description":41,"color":42},"f0c2a0af-58aa-4128-87c9-6acd30f2dc48","Supply Chain","supply-chain","Third-party risk, compromised dependencies","#8b5cf6",[],[45,49,53],{"slug":46,"name":47,"problem":48},"secrets-management","Secrets management","API keys, tokens and passwords stop leaking from code, chat and configuration files.",{"slug":50,"name":51,"problem":52},"endpoint-detection-response","Endpoint detection and response (EDR and XDR)","Malware and hands-on-keyboard attackers on laptops and servers get spotted and stopped.",{"slug":54,"name":55,"problem":56},"software-supply-chain","Software supply chain security","Malicious and vulnerable open-source packages are caught before they ship."]