Skip to main content
MalwarePublished Updated

testpgagent (PyPI) · Malicious Code

Affects TestPGAgentSource GCVE Database

0

Malicious package : remove TestPGAgent and rotate any secrets on hosts that installed it.

Data as of 9 Jul 2026, 10:03 UTC

Classification

Malicious package

Published to PyPI · OSV MAL-2026-5824

What to do

Remove TestPGAgent from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
PyPITestPGAgentAffected
  • =0.2
  • =0.1
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The TestPGAgent PyPI package versions 0.1 and 0.2 contain malicious code that executes during installation. The setup.py script uses base64-encoded obfuscated code to launch Windows mshta.exe to fetch and run a remote HTML application from an attacker-controlled HTTP server. This allows arbitrary code execution on any Windows machine installing these package versions. The malicious payload is unpinned, mutable, and unrelated to the declared publisher, indicating clear malicious intent.

References

Community reviews

Loading reviews…