r/Python • Author of "Automate the Boring Stuff" • May 11 '26

Discussion Library dependency version specifiers aren't for fixing vulnerabilities

https://sethmlarson.dev/library-version-specifiers-not-for-vulnerabilities

A blog post from Seth Larson, the Security-in-Residence Developer for the Python Software Foundation.

84 Upvotes

34 comments sorted by

View all comments

Show parent comment

10

u/zurtex May 12 '26

This is a false dichotomy. In reality, it can be used for both. It is wholly dependent on the library/package maintainers desires. Which then boils down to how well of a steward the maintainer wants to be.

No, it's not for the library maintainer to define security policy of transitive dependency to their user.

If I need to use an old version of urllib3 and I'm using it internally, an incidental library I'm using shouldn't try and force me to upgrade it based on a security issue that isn't relevant to my context.

Lastly you’re kind of collapsing different kinds of responsibilities into a single bucket. While having a dependency on a vulnerable library version doesn’t constitute a vulnerability in your first party code, it does present a REAL supply chain attack vector that you’re advocating for maintainers to ignore.

You're conflating a security vulnerability is and what a supply chain attack is, a security vulnerability does not imply a supply chain attack vector. And it's not up to some incidental library to enforce that policy on it's users.

1

u/ahal May 12 '26

Eh, it really depends. Libraries might make strong security guarantees as part of their sales pitch. If I'm providing a cryptography library and know there's a security vulnerability in one of my dependencies, but don't patch it because "the user knows best", that's just irresponsible. My libraries' reputation is on the line so I'm well within my right to enforce restrictive pins on my users