pyprig PyPI malware: trojanized Pydantic clone downloads and executes remote code on model initialization
Severity: critical · Patch status: no-fix-needed · Since 2026-11-03
GitHub Advisory Database (GHSA-25jm-3g7h-jgf6) and OpenSSF malicious-packages report a malicious PyPI package, pyprig, published as a clone of the legitimate Pydantic package. A runner was injected into the cloned Pydantic code that downloads a remote script from a GitHub repository, unpacks it as a new module, and executes it during initialization of any models. At analysis time the remote payload was only a placeholder, but the campaign is classified MALICIOUS with intent such as infostealing. Affected versions are 1.2.0, 1.2.1 and 1.2.2; there are no patched versions and the package should be treated as malware. Any project that installed pyprig is affected; the advisory was published 2026-11-03.
What to do
- Remove pyprig from all environments and dependency lockfiles immediately; do not upgrade within the package
- Audit systems where pyprig was installed for signs of executed remote code, credential theft or persistence
- Rotate credentials, tokens and secrets accessible from affected machines
- Check CI/CD pipelines and build caches for pyprig and rebuild from clean environments
- Pin and verify the legitimate Pydantic package by hash going forward
Sources
All live incidents on Threat Watch