Check requirements.txt for vulnerable dependencies
Upload or paste your requirements.txt. We check every Python package version in it
against OSV.dev and email you the
vulnerable ones, the version that fixes them and the pip command to upgrade. Free, and no account needed.
About requirements.txt
requirements.txt lists the packages pip installs. It can only be checked when versions are pinned with == (for example Django==5.2.8); a line like Django>=5.0 says which versions you accept, not which one you run.
To write or refresh it:
pip freeze > requirements.txt
Run it with your project's virtual environment active: it writes every installed package with its exact version, indirect ones included. With pip-tools, pip-compile writes a pinned file from requirements.in.
Good to know
- Lines without == (>=, ~=, or no version at all) are skipped: they say which versions you accept, not which one you run.
- Included files (-r other.txt, -c constraints.txt) are not followed: check each file on its own.
- A hand-written file often lists only your direct dependencies. pip freeze also lists what they pull in, which is where many vulnerabilities are.
Fixing a vulnerable package
The report gives the fixed version for each vulnerable package (FIXED below). With pip:
# Upgrade the package to the fixed version
pip install "package==FIXED"
# Write the new versions back to the file
pip freeze > requirements.txt
If the package is not in your own list, upgrade the package that depends on it, or add the fixed version as a pin (or as a constraint with pip-tools) and install again.
Then run your tests and commit the updated requirements.txt.
pip-audit -r requirements.txt and this check
pip-audit, from the Python Packaging Authority, runs in your terminal or CI and uses the same kind of advisory data. This check needs nothing installed, groups advisories per package with the one version that fixes them, and writes a prompt for your coding agent.
Other lockfiles
Questions
Why are some lines "not checked"?
Only exact versions can be matched against advisories, so lines with >=, ~= or no version are skipped. Use pip freeze, or pip-compile, to get a fully pinned file.
Does it understand environment markers and extras?
Yes: django[argon2]==5.2.8 and lines ending with ; python_version < "3.12" are read as the package and its version.
Related free tools
GitHub repo vulnerability check
Paste a public GitHub repo URL. We find every lockfile, check each package version against OSV.dev and email you the fixes. Free, no account.
Dependency vulnerability check
Check requirements.txt, package-lock.json, poetry.lock and more against OSV.dev. Free report by email with fix commands. No account needed.
Last updated .