PyPI Blocks Expired Domain Access to Prevent Resurrection Attacks

PyPI Blocks Expired Domain Access to Prevent Resurrection Attacks

The Python Package Index (PyPI) has implemented new security measures to protect against domain resurrection attacks, a sophisticated supply-chain threat where attackers purchase expired domains to hijack user accounts through password reset mechanisms.

Since early June 2025, the platform has proactively unverified over 1,800 email addresses associated with domains entering expiration phases.

Domain resurrection attacks exploit a fundamental vulnerability in email-based account verification systems. When PyPI users register accounts, they must verify their email addresses by clicking confirmation links.

The platform considers these verified email addresses as strong indicators of account ownership, particularly when coupled with two-factor authentication (2FA).

The attack vector emerges when domain names expire due to non-payment. Malicious actors can then register these expired domains, establish email servers, and request password resets for accounts associated with those domains.

This technique has already demonstrated real-world impact, affecting at least one PyPI project in 2022 and targeting other package ecosystems.

Technical Implementation

PyPI’s solution leverages domain status monitoring through Domainr’s Status API, a Fastly service that tracks domain registration states.

The platform performs daily checks on all domains used for user email addresses, updating its internal database with current status information.

When a domain enters the redemption period—typically occurring 30 days after initial expiration—PyPI automatically unverifies previously validated email addresses from that domain.

This timing aligns with standard domain expiration workflows, where domains pass through grace periods before becoming available for re-registration.

The system operates on a 30-day interval, designed to catch domains while they remain in renewal grace or redemption periods, before potential ownership transfers.

PyPI has unverified over 1,800 email addresses

However, PyPI acknowledges this approach cannot detect legitimate domain transfers between cooperating parties.

Following initial implementation in April 2025, PyPI’s automated monitoring system has processed significant volumes of potentially compromised email addresses.

The daily verification process continues protecting both PyPI account holders and end users of Python packages.

The security enhancement particularly benefits older accounts created before PyPI’s 2FA requirement, implemented for accounts with activity after January 1, 2024.

While newer accounts with 2FA require additional authentication factors beyond email access, the domain monitoring system provides comprehensive protection across PyPI’s entire user base.

PyPI advises users with single verified email addresses from custom domains to add secondary verification through established providers like Gmail.

This redundancy ensures account access remains possible if primary domains expire unexpectedly.

Additionally, users should implement 2FA across all services using the same email addresses, as attackers may attempt account recovery through multiple platforms during domain resurrection campaigns.

These layered security practices significantly reduce successful attack vectors while maintaining user accessibility to PyPI’s extensive package repository.

Find this News Interesting! Follow us on Google News, LinkedIn, and X to Get Instant Updates!


Source link

About Cybernoz

Security researcher and threat analyst with expertise in malware analysis and incident response.