[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fZs88AT4JuTafJ645haWYNKHXdd4qWVeDtyXQC7h609c":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":50},"294312c3-352c-4aa5-a436-432393019e7d","malicious-pypi-package-targets-azure-and-github-credentials-via-supply-chain-attack","5e86a3ff-81e0-4778-b84a-355ce40c793b","Malicious PyPI Package Targets Azure and GitHub Credentials via Supply Chain Attack","Attackers hijacked or impersonated Microsoft's agent-framework PyPI package by publishing two trojanized versions (1.26.1 and 1.26.2) containing a credential stealer that executed automatically at Python startup via a .pth file. This technique is particularly dangerous because .pth files are processed before user code runs, making the malicious payload nearly invisible to developers who trust the package ecosystem. The malware silently exfiltrated Azure identities, GitHub tokens, and CI\u002FCD secrets to an attacker-controlled webhook, meaning any automated build pipeline that pulled these versions could have handed over credentials without any user interaction. This incident illustrates how dependency on public package registries without integrity verification creates a silent, high-impact attack vector that bypasses most traditional security controls.","**Immediate actions:**\n- Audit all Python environments and CI\u002FCD pipelines for the presence of agent-framework versions 1.26.1 or 1.26.2 and remove them immediately.\n- Rotate all Azure, GitHub, and CI\u002FCD secrets that may have been exposed in affected build environments.\n- Pin dependencies to known-good, cryptographically verified versions using hash-pinning in requirements files (e.g., `--hash` in pip).\n\n**Long-term improvements:**\n- Establish a private package mirror or artifact repository (e.g., Azure Artifacts, JFrog Artifactory) so all third-party packages are vetted before use.\n- Integrate software composition analysis (SCA) tooling into CI\u002FCD pipelines to flag newly introduced or updated transitive dependencies before they execute.\n- Enforce a dependency review process that requires explicit approval for any package version change in production pipelines.\n\n**Detection measures:**\n- Monitor outbound network traffic from build agents for unexpected connections to external webhook or data-exfiltration endpoints.\n- Alert on the creation or modification of .pth files within Python site-packages directories in build and production environments.\n- Subscribe to PyPI security advisories and package integrity feeds (e.g., OSV, GitHub Advisory Database) to receive timely notification of malicious packages.",[12,13,14,15,16],"MITRE ATT&CK T1195.001: Supply Chain Compromise: Compromise Software Dependencies and Development Tools","MITRE ATT&CK T1552.001: Unsecured Credentials: Credentials In Files","CIS Control 16: Application Software Security (v8)","NIS2 Article 21(2)(d)","NIST SP 800-53 SR-4: Provenance",{"NIS2 Article 21(2)(d)":18,"NIST SP 800-53 SR-4: Provenance":19,"CIS Control 16: Application Software Security (v8)":20,"MITRE ATT&CK T1552.001: Unsecured Credentials: Credentials In Files":21,"MITRE ATT&CK T1195.001: Supply Chain Compromise: Compromise Software Dependencies and Development Tools":22},"NIS2's supply chain security point requires entities to assess and manage security risks arising from their software and service suppliers, which includes verifying the integrity of third-party packages consumed from public registries.","SR-4 requires organizations to document and verify the provenance of software components, which would have mandated integrity checks (e.g., hash verification) on PyPI packages before allowing them into build pipelines.","CIS Control 16 requires organizations to manage the security of software they acquire and use, including vetting third-party libraries and components, which would have flagged the malicious PyPI package before execution.","The malware harvested Azure identities, GitHub tokens, and CI\u002FCD secrets stored in environment variables and configuration files accessible during Python startup, matching this technique's focus on credential theft from files and environment state.","This technique directly describes adversaries injecting malicious code into a trusted public package repository to compromise downstream consumers, which is exactly how the trojanized PyPI versions were delivered.","published","2026-11-18T04:20:22.459748+00:00","2026-11-18T04:20:22.446+00:00",{"id":7,"url":27,"slug":28,"title":29},"https:\u002F\u002Fcybersecuritynews.com\u002Fmicrosofts-agent-framework-pypi-package\u002F","microsoft-s-agent-framework-pypi-package-hacked-to-steal-azure-and-github-creden-85d9c1","Microsoft’s Agent Framework PyPI Package Hacked to Steal Azure and GitHub Credentials",[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",[44],{"id":45,"date":46,"edition":47,"title":48,"audio_url":49},"fc1a6d4f-986d-4a0d-afe1-a25b09b1983d","2026-11-18","morning","ThreatNoir Morning Brief — November 18","https:\u002F\u002Fcdn.threatnoir.com\u002Fpodcasts\u002F2026-11-18\u002Fthreatnoir-morning-brief-2026-11-18.mp3",[51,55,59],{"slug":52,"name":53,"problem":54},"secrets-management","Secrets management","API keys, tokens and passwords stop leaking from code, chat and configuration files.",{"slug":56,"name":57,"problem":58},"threat-intelligence","Threat intelligence","Attack campaigns reach your sector, suppliers or software before your team hears about them.",{"slug":60,"name":61,"problem":62},"software-supply-chain","Software supply chain security","Malicious and vulnerable open-source packages are caught before they ship."]