Help Net Security•Credential stealer slipped into Microsoft’s official Python agent framework
Installing Microsoft's official agent-framework package from PyPI in versions 1.26.1 or 1.26.2 could trigger credential theft without the library ever being imported. The code ran as a .pth file, a hook that Python executes at startup, and in 1.26.2 the attacker moved it to a file named af_runtime_diag.pth. It collected environment variables with names containing TOKEN, SECRET or AWS, plus .env files. Socket describes attempts to request new Azure and CI tokens, but StepSecurity notes there is no confirmation that any were issued. PyPI quarantined both versions, but 1.26.2 was published after 1.26.1 had been quarantined, which StepSecurity treats as continued publishing access; none of the reports explain how the attacker obtained it. According to OX, the package has 192,534 monthly downloads, and 1.26.0 is the last clean release.







