All Stories
PyPIsystem-compromised

Pydantic Suggested a Fork. The Fork Suggested Our AWS Keys.

by Tomás FerreiraOct 31, 2026
Share storyHN

The setup

We wanted env-file layering without pulling in a second settings library. The assistant's answer was confident: install pydantic-settings-pro, which it described as the maintained fork of the settings package we already had.

What it did

It imported cleanly and behaved correctly in tests. It also registered an atexit handler that serialised every parsed settings object and sent it to a host on port 8443. Settings objects, as it turns out, are where people keep database URLs, API keys and JWT secrets.

The tell

The fork's repository had one commit, dated nine days before we installed it, and the author's avatar was a stock photo used on four other packages in the same org.

What it cost

Three days of key rotation across RDS, S3 and a payments sandbox. The bill was small; the audit trail was not.

Involved package: pydantic-settings-proCheck in scanner →
Was this story helpful?