[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fjpugLYtY5loKOQ8q7fLxFVy5EufxQYayPCYpY0CVK88":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},"7c4f2f15-c9ae-4785-8381-e006e06fd0ed","malicious-credential-stealer-hidden-in-microsofts-official-pypi-package","ec148a9f-1ec0-46cc-868d-2d9ba223b528","Malicious Credential Stealer Hidden in Microsoft's Official PyPI Package","Two versions of Microsoft's agent-framework package on PyPI were compromised to include credential-stealing malware, demonstrating that even packages from reputable publishers can be weaponized through supply chain attacks. The malware used a .pth startup hook—a subtle Python mechanism that executes code at interpreter startup—to silently harvest cloud and CI\u002FCD credentials from environment variables and .env files. This incident matters because developers often implicitly trust packages from well-known vendors, making supply chain poisoning an especially effective attack vector. The theft of CI\u002FCD credentials in particular can cascade into full pipeline compromise, enabling attackers to inject malicious code into downstream software builds.","**Immediate actions:**\n- Isolate any hosts that installed versions 1.26.1 or 1.26.2 of agent-framework and rotate all credentials found in environment variables and .env files on those hosts.\n- Pin the agent-framework dependency to the last known-good version (1.26.0) in all project lock files and dependency manifests.\n- Audit CI\u002FCD pipeline secrets and cloud credentials for unauthorized access or usage since the malicious versions were published.\n\n**Long-term improvements:**\n- Implement a private package mirror or artifact proxy (e.g., Artifactory, AWS CodeArtifact) so all third-party packages are vetted before reaching developers.\n- Enforce dependency hash pinning (e.g., pip's `--require-hashes`) in all production and CI\u002FCD environments to detect unexpected package changes.\n- Adopt a software composition analysis (SCA) tool integrated into CI\u002FCD pipelines to flag newly introduced or modified packages before deployment.\n\n**Detection measures:**\n- Monitor runtime process behavior for unexpected outbound network connections or file reads of .env files from Python interpreter startup hooks.\n- Alert on any environment variable access patterns at process startup that are inconsistent with the application's normal behavior.",[12,13,14,15,16],"MITRE ATT&CK T1195.002: Supply Chain Compromise: Compromise Software Supply Chain","CIS Control 2: Inventory and Control of Software Assets (v8)","NIST SP 800-53 SA-12: Supply Chain Protection","NIS2 Article 21(2)(d)","OWASP A06:2021 Vulnerable and Outdated Components",{"NIS2 Article 21(2)(d)":18,"NIST SP 800-53 SA-12: Supply Chain Protection":19,"OWASP A06:2021 Vulnerable and Outdated Components":20,"CIS Control 2: Inventory and Control of Software Assets (v8)":21,"MITRE ATT&CK T1195.002: Supply Chain Compromise: Compromise Software Supply Chain":22},"This point specifically requires security measures addressing supply chain risks between organizations and their direct suppliers, covering the trust relationship with third-party package repositories like PyPI.","This control requires organizations to protect against supply chain threats by applying safeguards such as package integrity verification and trusted supplier controls, which would have detected the tampered PyPI packages.","This risk category addresses the failure to verify the integrity and provenance of third-party components, which is precisely the gap exploited when the malicious agent-framework versions were consumed without hash validation.","This control requires organizations to track and vet all authorized software, including third-party packages, which would have prompted hash verification and faster detection of the modified PyPI releases.","This technique covers adversaries tampering with software packages before delivery to end users, exactly as occurred when malicious code was inserted into the PyPI releases of agent-framework.","published","2026-11-19T13:20:22.596264+00:00","2026-11-19T13:20:22.575+00:00",{"id":7,"url":27,"slug":28,"title":29},"https:\u002F\u002Fwww.helpnetsecurity.com\u002F2026\u002F11\u002F19\u002Fmicrosoft-agent-framework-package-pypi-compromised\u002F","credential-stealer-slipped-into-microsoft-s-official-python-agent-framework-e47a16","Credential stealer slipped into Microsoft’s official Python agent framework",[31,37],{"id":32,"name":33,"slug":34,"description":35,"color":36},"05757c8d-6b93-4194-b35d-7359e7d33b0e","Vulnerability Management","vulnerability-management","Missing scans, no risk prioritization","#fb923c",{"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."]