PyPI Bars Adding Files to Releases Older Than 14 Days
Translated by a model; the original is in Russian.
Seth Larson, the Python Software Foundation's visiting security specialist, has announced that the Python Package Index (PyPI) now rejects uploads of new files to releases published more than 14 days ago. The restriction is meant to prevent the “poisoning” of older releases in the event that a project's publishing tokens or CI processes are compromised.
Why it was needed
The idea itself had been under discussion since January 2024 — as part of the work on PEP 740 (digital attestations). The conversation resumed in March 2026, after the compromise of the popular packages LiteLLM and Telnyx. The breach was caused by a “mutable reference” in how these projects used a GitHub Action for Trivy: pinning to a moving tag made it possible to swap in different executable code. LWN wrote about the LiteLLM incident in detail in March.
Why the decision dragged on
Initially the discussion stalled: some projects deliberately relied on the ability to upload additional files to already-published releases. This was how they added support for new Python versions to old releases — for example, posting a fresh wheel for a just-released interpreter version without bumping the release number.
To gauge how painful the ban would be, the PyPI database was run against projects that had published new files to old releases — broken down by the number of days elapsed since the release. Then, separately, cp314 wheels (for Python 3.14) were checked among the 15,000 most popular packages. It turned out that only 56 projects out of 15,000 had posted a 3.14-compatible wheel more than 14 days after the release. In other words, the real-world scenarios that the change would break proved to be vanishingly few — and the security gain outweighs them.
Still, not everyone thinks the threshold is well chosen. In the comments under the announcement came an ironic suggestion: if this is really about security, the window should be cut not to 14 days but to an hour and a half — if only so that distribution maintainers aren't left with a surprise when a maintainer quietly swaps out an archive shortly after a release because of a “last-minute bug,” without changing the version number.
Source: LWN.net
Comments
Sign in, to comment.