The PSF Strategic Plan was announced in September this year, and among the top program goals for the next five years are “Securing Python's Software Supply Chain and Distribution Infrastructure” and to “Responsibly Grow and Advance Critical Python Infrastructure”. This Security Roadmap puts the plan into motion; below are the PSF’s areas of focus on security for the upcoming year:
- Sustainability of PyPI Malware Remediation
- Establish “Compromise Resilience” for PyPI and Python.org
- Vulnerability Remediation and Advisory Capacity
- Post-Quantum Cryptography Readiness
These plans are in addition to our ongoing commitments to Python ecosystem security, such as involvement in the Python Security Response Team, operating a CVE Numbering Authority,removing malware from PyPI, and continuing to expand access to security features everywhere that Python projects are developed.
Each section contains information about how to contribute to each area if you are interested. If you or your organization would like to support security work in the Python ecosystem more broadly through staffing please contact sponsor@python.org to support the PSF Developers-in-Residence program. Thanks to Alpha-Omega and Anthropic for sponsoring security-focused staff at the Python Software Foundation.
Sustainability of PyPI Malware Remediation
Back in 2024 we announced a new program for reporting malware to PyPI admins using an API for a tighter integration between security researchers scanning for malware and the admins triaging these reports. This program has been a quiet success so far, and we plan to expand the program in 2027 by expanding access to more researchers and reporters, using the data for autonomous remediation and better spreading the load where manual intervention is still necessary. Big thank-you to all security researchers contributing to this program and keeping the Python ecosystem safe.
The specific goal for how we plan to evolve this program is to reduce staff time spent on remediating malware reports that are high confidence. Leaning on the new “Quarantine” mechanic to drive malware reports to a resolved state while minimizing human intervention necessary for the volumes we’re experiencing today. Today we’ve already implemented this autonomous remediation only with a very high confidence signal, where multiple trusted reporters have to report the same project for an autonomous quarantine action to take place. For example, this autonomous trigger resolved the Telynx supply-chain attack in under 3 hours earlier this year.
Using the data we’ve collected over two years running this program we will refine the heuristics for autonomous quarantining of projects and releases to de-list malware and stop supply-chain attacks sooner without disrupting legitimate use of PyPI or requiring ever-increasing staff time. Look forward to us publishing specific metrics about manual versus autonomous responses to malware in future security updates.
No autonomous system is perfect, and we expect there to still be false-positives. To mitigate this we’ll be adding a new “Malware Triager” role with access to manage malware reports on PyPI without having full access to the PyPI administrators dashboard and privileges. Today, only a small number of PyPI admins can take the final determinations on PyPI malware reports. By adding an appropriately privileged role to do this work we hope to expand the number of contributors in this area, starting with new Security Developer and Infrastructure staff at the PSF.
You can contribute to malware remediation on PyPI by reporting malware to security@pypi.org following our policy on malware, either as an individual researcher or as an institution doing mass-scanning of packages on PyPI. Subscribe to the PyPI blog for updates to the malware remediation program.
Establish Compromise Resilience for PyPI and Python.org
LLMs and agents are shrinking the time between a vulnerability being discoverable to an active exploit being developed and deployed. PyPI is a high-value target to compromise and use as a distribution mechanism for malware, as installers are constantly downloading and executing software hosted by PyPI. We regularly audit PyPI and Python.org codebase and infrastructure, but we cannot completely rule out a compromise of these services. Applying defense-in-depth and building systems that don’t rely on assumptions of perfect security would reduce the harm caused by a compromise and enable recovery into a known-secure state.
To combat this reality, the PSF will establish “Compromise Resilience” of critical infrastructure like PyPI and Python.org, both to discourage active exploitation attempts by preemptively having installers reject modified or hijacked artifacts and create a “Compromise Recovery Runbook”, meaning in the case of a compromise we’d be able to confidently restore both PyPI and Python.org to a verifiably secure state. This recovery runbook will be exercised on regular intervals to ensure continued coverage. There are multiple methods for establishing compromise resilience for PyPI that have already been proposed, all proposals will be evaluated.
Python.org and the Python release artifacts are already in a good state, as today the Python project guarantees Sigstore signatures with known identities for all artifacts available on python.org/downloads. What matters then is that downstream distributions and consumers are verifying these artifacts and their signatures to provide robustness to compromises. To achieve this goal we intend to create a “Secure Python Distributions” program, which provides criteria for Python distributions and their users to check that the distribution is verifying the integrity of artifacts correctly, among other security best practices such as timely releases of security fixes.
If you contribute to a Python distribution, you can read the documentation for verifying Sigstore artifacts and adopt these practices into your build pipeline for Python. Package installers should follow the Packaging topic on Discourse and comment on future PEPs in this security area. Announcements about new supply-chain integrity features and how to integrate them will be made to the PyPI blog.
Vulnerability Remediation and Advisory Capacity
The total number of known vulnerabilities affecting open source components has dramatically increased due to large language models (LLMs) and agents being used to discover vulnerabilities in open source software. The Python Security Response Team is triaging and publishing around 4× more vulnerabilities compared to the same time a year ago. The increase has strained contributors at each step of the vulnerability handling process, from triage, fixing, publishing vulnerability records (CVE or OSV), and updating dependencies. Vulnerability time-to-exploit is also decreasing as attackers also have access to LLM code generation capabilities, meaning keeping dependencies up-to-date and applying defense-in-depth is more important than ever.
Vulnerability fixes don’t help if the notifications aren’t reaching the users that are affected. This is primarily the task of vulnerability databases, such as CVE, GHSA, and other OSV-based databases. These databases carry information in machine-readable formats that tools like vulnerability scanners can ingest and inform users when vulnerabilities are present in their software.
Today the systems that match upstream fixes and software identities to create vulnerability records are often using fuzzy matching with imperfect and incomplete data. This means human intervention is needed to keep vulnerability data ingestion running smoothly, but human intervention doesn’t scale to the new volume of advisories we’re experiencing. We’ll evaluate overhauling the database for Python ecosystem vulnerabilities to make it authoritative by establishing clear criteria for inclusion and enabling project maintainers to contribute updates in case of errors.
Using the above data the PSF, as a user of Python dependencies, can improve the uniformity and promptness of our patching response by adopting a “Secure Dependency Baseline”, including machine-readable software inventories and automated vulnerability scanning and patching across PSF stewarded repositories.
The PSF will continue the work to improve vulnerability handling for Python and pip through the Python Security Response Team, adding additional engineering time through the Developers in Residence Program to triaging and remediating vulnerabilities in core Python projects. We will continue sharing our process changes and experiences publicly as the vulnerability landscape changes.
If you’d like to support this area there are several Open Source projects that accept contributions such as the advisory database. Individual projects can improve their vulnerability handling posture and processes by documenting how to report vulnerabilities to the project in a SECURITY.md and authoring a threat-model describing how the software is meant to be used or integrated. Users can improve their security posture by adopting vulnerability scanning tools that alert you when Open Source components have published a new vulnerability advisory.
Post-Quantum Cryptography Readiness
Significant improvements to quantum error-correction were published in 2026, increasing the chances a cryptographically-relevant quantum computer is created by 2030. What this would mean concretely is that many cryptographic algorithms, especially asymmetric key exchange or signature algorithms, would have their security properties significantly weakened. We will need to start the work to adopt quantum-safe algorithms and a posture of “cryptographic agility” to ensure secure cryptography for Python users in every future, regardless of whether quantum computers and cryptoanalysis continue to improve.
Python users need access to post-quantum secure algorithms in the standard library, and a migration path to adopt those algorithms. A PEP outlining the schedule and availability for quantum-safe algorithms will be completed targeting the Python 3.16 feature window (May 2027). An adoption guide informational PEP will be created for Python library maintainers and Python users to ensure their codebase is quantum-safe and how to prepare for future changes if necessary. Where relevant, work will be done to add support to Python package installers as needed to ensure a smooth transition.
Post-quantum cryptographic algorithms (PQC) for TLS will be added to all services hosted by the PSF (PyPI, Python.org) in advance to allow for the transition and testing. At a future date, following how the landscape unfolds and information from relevant experts, the PSF will publish a deprecation and removal schedule for quantum-vulnerable key exchange algorithms across PSF services, similar to work already done for TLS 1.0 and 1.1 in 2021. In addition to outward-facing services, all internal services and uses of cryptography will be audited to ensure quantum-safe algorithms are in use or there is an adoption plan in place.
The draft PEP for post-quantum cryptography for Python is already being written by Emma Smith, Bénédikt Tran, and Seth Larson and will be published for review soon. If you are an expert in this area, we hope to see your review on the PEPs which will be published on Discourse. Once the PEPs have been approved then rollout begins. Maintainers and contributors to projects using HTTPS, TLS, or other affected algorithms will need to create migration plans to adopt quantum-safe algorithms in their projects.
You can support this work: Join in the PSF’s end-of-year fundraiser
Python is for gathering, teaching, learning, playing, researching, exploring, creating, building, working, sustaining. The list goes on and on and on! Support the security of Python, PyPI, and this year’s PSF fundraiser with your donations and memberships to help keep our Foundation, the Python community, and the language stay strong and sustainable. Because Python is for everyone, thanks to you.
Are you interested in sponsoring or donating to the PSF so we can continue supporting Python and its community? Check out our sponsorship program, donate directly and become a member, or contact our team at sponsors@python.org!
About the Python Software Foundation
The Python Software Foundation is a US non-profit whose mission is to promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers. The PSF supports the Python community using corporate sponsorships, grants, and donations.