source: simon willison: quoting seth larson

level: technical

the python package index (pypi) has added a new restriction. it will no longer accept new file uploads for releases that are more than 14 days old. this change aims to stop attackers from poisoning stable, long-standing packages. if a project's publishing token or workflow is compromised, an attacker could previously add malicious files to old releases. this would let them target users who rely on specific older versions.

the restriction closes a gap that had no technical barrier to exploitation. as of now, there are no known cases of this being abused in the wild. however, the risk was real because many projects keep the same release version for years. an attacker with access could silently inject harmful code into a trusted version. the 14-day window still allows normal release processes, like adding built distributions shortly after a source release.

this update is part of broader efforts to secure the python package ecosystem. pypi has been rolling out measures like mandatory two-factor authentication and trusted publishing. the new rule reduces the attack surface for supply chain compromises. it also encourages maintainers to treat releases as immutable after a short period. the change was announced by seth larson on the pypi blog.

why it matters: this reduces the risk of undetected malware injection into widely used python packages, protecting downstream applications and data pipelines.


source: simon willison: quoting seth larson