Security

As of July 2026, PyPI hosts over 750,000 packages, and this number is growing daily. An average Python project includes dozens of additional dependencies – packages that you have never explicitly chosen, but on which you nevertheless rely because your dependencies require them. When you install pandas in your application, you get more than just pandas. The complete dependency tree looks like this:

$ uv add pandas
$ uv pip tree
myapp v0.1.0
└── pandas v3.0.5
    ├── numpy v2.5.1
    └── python-dateutil v2.9.0.post0
        └── six v1.17.0

Although you only wanted to add one package (pandas), you ended up with four without being asked. Even if just one of these transitive packages – which you never explicitly installed – were to contain a security vulnerability, your entire application would be at risk. This greatly increases the attack surface compared to what you yourself specified in dependencies.

Here are just a few recent attacks on the software supply chain:

These are not theoretical attacks. They have occurred in real-world projects with millions of users. If you discover a malicious package on PyPI, you can report it via PyPI’s security reporting system.

Security challenges are on the rise

In June 2026, Seth Larson, a member of the Python Security Response Team, published a chart showing the annual trend in security vulnerabilities published by Python, which indicates that the number is expected to triple in 2026:

Number of CVEs published annually by Python. It is expected that around 65 CVEs will be published in 2026.

Source: https://mastodon.social/@sethmlarson/116680832573268456

However, this merely reflects the results and does not provide an overview of the reports received. Many of these are closed and treated instead as non-security-related error reports; others are closed as neither security nor error reports. Here is the number of reports created since July 2024 relating to GitHub security advisories:

Chart showing new security reports. From 2024, single-digit numbers or zero per month, rising to around 40 in 2026.

Source: Hugo van Kemenade: Security: line goes up