PyPI: Preventing Domain Resurrection Attacks

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

PyPI now auto-unverifies account emails whose domains expire, closing a supply-chain attack vector that previously let attackers hijack maintainer accounts.

Read this as

PyPI is the service where people publish ready-to-install Python code packages. Attackers had learned to buy expired domain names belonging to package maintainers, then use the email addresses on those domains to reset passwords and take over accounts. Since June 2025, PyPI checks whether an account's email domain is expiring and removes its verified status automatically. It has unverified over 1,800 addresses this way.

Organisations publishing Python packages face supply-chain risk if a maintainer's email domain lapses and an attacker buys it. PyPI now polls domain status via Fastly's Domainr every 30 days and unvalidates addresses on expiring domains, 1,800+ addresses affected since June 2025. Teams should treat expired domains as a security incident and verify their own maintainers' domains are registered long-term.

Mike Fiedler landed a Warehouse PR in April 2025 integrating Domainr's API via Fastly, plus a second PR polling domain status for any email domain unchecked in the past 30 days. Domains entering expiration phases trigger email unverification; 1,800+ addresses were unverified between early June and August 2025. The mechanism is a defense-in-depth mitigation, not a complete fix, and the attack was demonstrated in the real 2022 takeover of the ctx package.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

PyPI Domainr Fastly ctx

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading