Python and PyPI's 2027 Security Roadmap Prepares for Compromises of Their Distribution Infrastructure
On November 30, 2026, the PSF published its security roadmap for Python and its package index, PyPI. It puts the five-year strategic plan announced in September into practice through malware defense, resilience to infrastructure compromise, vulnerability fixes and reporting, and preparation for post-quantum cryptography.
The PSF says that by the time of the announcement, the Python Security Response Team was evaluating and publishing about four times as many vulnerabilities as in the same period a year earlier. It attributes the increase to faster discovery using large language models (LLMs) and AI agents.
The extra work goes beyond assessing reports. It includes developing fixes, publishing advisories, and updating dependencies. The PSF says attackers can also use LLMs, shortening the time between a vulnerability becoming discoverable and being exploited.
Better ways to find vulnerabilities are welcome. Helping users stay safe requires the capacity to assess and fix issues to keep pace with discovery.
Expanding automated malware quarantine
In 2024, PyPI introduced an API for security researchers to report malware. At the time of the announcement, the PSF said automated quarantine was limited to projects reported by multiple trusted reporters.
Quarantined projects are removed from the usual installation path. PyPI administrators can lift quarantine and make a project public again.
The PSF plans to bring in more reporters, including researchers, in 2027. It will use accumulated reporting data to improve quarantine decisions and shorten the time malicious distributions are available.
In an April 2, 2026 incident report, PyPI said roughly 700 to 800 new projects were being registered each day. It recorded more than 119,000 downloads of malicious versions during the LiteLLM supply chain attack.
When fetching packages is automated, malicious software can reach many systems even in a short window between discovery and quarantine. Reducing the wait for manual review matters.
Quarantining a legitimate project in error can also affect users who need its libraries. The PSF plans to create a Malware Triager role to address false positives from automated quarantine. This would let more people handle reports without granting them full PyPI administrator access.
Preparing for a compromise of the distribution sites
The PSF regularly audits the code and infrastructure behind PyPI and Python.org. Its roadmap also considers the possibility that the distribution infrastructure itself could be compromised and calls for ways to make installers reject tampered distributions. Several approaches to making PyPI more resilient have already been proposed and will be evaluated.
The PSF also plans a Compromise Recovery Runbook to restore PyPI and Python.org to a verifiably secure state. It intends to rehearse the recovery procedures regularly.
If a distribution site is compromised, a file downloaded from the legitimate URL could still be tampered with. Users need ways to verify both that it came from the expected publisher and that its contents were unchanged.
Official Python releases already carry Sigstore signatures. According to Python's verification guidance, Sigstore is the sole signing method for official Python 3.14 and later release artifacts. Verification also requires knowing the expected signer's identity in advance.
The PSF plans to introduce a Secure Python Distributions program for projects that redistribute Python and for their users. It will set criteria for checks such as whether distribution integrity is verified properly and whether security fixes are delivered promptly.
The official Python SDK for LINE's Messaging API is distributed on PyPI. Both files for version 3.27.0 have provenance attestations. PyPI provenance attestations provide a verifiable record of where files came from. Establishing where a file came from and assessing whether it is safe are both important.
Delivering accurate vulnerability information
Even after a fix is published, it may take time to apply if people using the affected software never see the advisory.
The PSF says linking fixes to affected software when recording vulnerabilities can involve fuzzy matching on incomplete data. That requires human review and adds to the burden as the volume of information grows.
The PSF is considering changes to Python's vulnerability databases that would clarify inclusion criteria and let project maintainers help correct inaccurate entries.
The PSF also plans to adopt a Secure Dependency Baseline for repositories it manages. This would include machine-readable software inventories, automated vulnerability scanning, and automatic application of fixes.
PyPI's April incident report also lists steps users can take. As a malware defense, it suggests waiting a set period before downloading newly published versions, while using vulnerability scanning to avoid delaying security fixes.
Sometimes it pays to wait to avoid a malicious distribution, and sometimes a fix needs to go in quickly. Timely and accurate vulnerability information helps users decide what to update and when.
Bringing post-quantum cryptography to the standard library
A quantum computer capable of breaking widely used cryptography could weaken many current key exchange and signature schemes. The PSF plans to make post-quantum cryptography available through Python's standard library.
The PSF aims to complete a Python Enhancement Proposal (PEP) laying out the schedule for post-quantum cryptography by May 2027, when Python 3.16 is expected to stop taking new features. According to the Python 3.16 schedule, the feature freeze begins with beta 1 in May 2027.
A separate PEP would provide migration guidance for library developers and users. Rollout would start after the PEPs are approved.
The PSF also plans early adoption of post-quantum cryptography in TLS on services it operates, including PyPI and Python.org. It intends to publish a schedule for phasing out key exchange methods vulnerable to quantum computers.
The roadmap gives secure delivery of code attention alongside the security of Python itself. Malicious distributions need to be quarantined, downloaded files verified, and fixes delivered promptly. The cryptography supporting those steps also needs to evolve as quantum computing advances.
Developers should be able to receive the code they intended to install when they need it. That is the expectation this plan aims to protect.
KioskNews shows a cleaned-up reading view extracted from the publisher’s page — the original always lives on their site, not ours.
