Check composer.lock for vulnerable dependencies
Upload or paste your composer.lock. We check every PHP package version in it
against OSV.dev and email you the
vulnerable ones, the version that fixes them and the Composer command to upgrade. Free, and no account needed.
About composer.lock
composer.lock is written by Composer next to composer.json. It records the exact version of every package installed in vendor/, for "packages" and "packages-dev".
To write or refresh it:
composer update --lock
composer install writes it when it does not exist. Commit it.
Good to know
- composer.json cannot be checked: it has version constraints.
- Development packages (packages-dev) are checked too.
Fixing a vulnerable package
The report gives the fixed version for each vulnerable package (FIXED below). With Composer:
# Upgrade one package and what it needs
composer update vendor/package --with-dependencies
For an indirect package, composer update with its name also works when its parents allow the fixed version; otherwise upgrade the parent package.
Then run your tests and commit the updated composer.lock.
composer audit and this check
composer audit is built in (Composer 2.4 and later). This check needs nothing installed and works for your other languages too.
Other lockfiles
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 .