The Python Package Index (PyPI) has announced that it will require all accounts that maintain a project to have two-factor authentication (2FA) enabled by the end of 2023.
The official software repository for Python, PyPI has become the target of numerous supply chain attacks over the past years, in some of which threat actors compromised maintainer accounts to inject malicious code into projects.
By enforcing 2FA for project maintainers, PyPI wants to prevent account takeover attacks, thus reassuring the community that only people associated with a project can upload, modify, or delete code.
“Between now and the end of the year, PyPI will begin gating access to certain site functionality based on 2FA usage. In addition, we may begin selecting certain users or projects for early enforcement,” PyPI administrator and maintainer Donald Stufft says.
PyPI project maintainers can use either a security device or an authenticator application for the second authentication step, and can also switch to using trusted publishing (relies on the OpenID Connect (OIDC) standard for token exchange) or API tokens when uploading to PyPI.
By requiring 2FA to be enabled for all maintainer accounts, including organization accounts, PyPI wants to make sure that all projects on the repository are better protected.
“[It] only takes one compromised project in someone’s dependency set to compromise their computer. […] Once compromised, an attacker can extend that attack to attack other systems, including other projects on PyPI that the now compromised person maintains,” Stufft notes.
In addition to enforcing 2FA, PyPI is working on reducing the amount of IP address data it stores, by evaluating where that type of data is needed on the site and removing its collection where it is not.
Thus, while IP addresses are still used for rate limiting and fallbacks, they are no longer stored in Journal entries, which are accessible to admins only. IP data is still needed to prevent abuse, but the repository is searching for alternative approaches that could also help increase user security.
Following a recent audit, PyPI discovered that the use of PGP signatures when uploading packages to the repository is no longer defensible, given low usage and other issues, and has decided to remove PGP. While existing signatures will continue to work, no new ones will be made available and any newly uploaded PGP signatures will be ignored.
Related: Malicious NPM, PyPI Packages Stealing User Information
Related: PyPI Users Targeted With ‘Wacatac’ Trojan in New Supply Chain Attack
Related: PyPI Users Targeted With PoweRAT Malware

More from Ionut Arghire
- Generative AI Startup Nexusflow Raises $10.6 Million
- Researchers Extract Sounds From Still Images on Smartphone Cameras
- Hackers Set Sights on Apache NiFi Flaw That Exposes Many Organizations to Attacks
- Cloudflare Users Exposed to Attacks Launched From Within Cloudflare: Researchers
- FBI Warns Organizations of Dual Ransomware, Wiper Attacks
- Lumu Raises $30 Million for Threat Detection and Response Platform
- Cisco Warns of IOS Software Zero-Day Exploitation Attempts
- Russian Zero-Day Acquisition Firm Offers $20 Million for Android, iOS Exploits
Latest News
- Bankrupt IronNet Shuts Down Operations
- AWS Using MadPot Decoy System to Disrupt APTs, Botnets
- Generative AI Startup Nexusflow Raises $10.6 Million
- In Other News: RSA Encryption Attack, Meta AI Privacy, ShinyHunters Hacker Guilty Plea
- Researchers Extract Sounds From Still Images on Smartphone Cameras
- National Security Agency is Starting an Artificial Intelligence Security Center
- CISA Warns of Old JBoss RichFaces Vulnerability Being Exploited in Attacks
- Hackers Set Sights on Apache NiFi Flaw That Exposes Many Organizations to Attacks
