Skip to content
Laskyr

Composer vulnerability checker

Paste or upload your composer.lock. You get every installed PHP package that has a known security advisory, the advisories that affect your exact version, and the version that fixes them.

Free · No signup · Processed in memory and thrown away. We never store or log your composer.lock. Only package names are sent to Packagist to look up advisories.

What this checks

composer.lock lists the exact version of every package your project installs, in packages and packages-dev. We compare each version with the security advisories on Packagist. Packagist collects them from the GitHub Advisory Database and the FriendsOfPHP security advisories. A package shows up only when your installed version falls inside an advisory's affected range.

For each affected package you see the advisories, their severity where one is given, and the version that fixes them. When several advisories apply, we work out the lowest version that is outside all of them.

What composer audit is

composer audit is a command built into Composer 2.4 and later. It reads your composer.lock and checks it against the same Packagist advisory data. It runs on your machine and needs no account. This page gives you the same answer when you only have the lock file, or when you want a readable list to share with a client or a team.

How to run composer audit yourself

Open a terminal in the project folder, the one with composer.json in it, and run:

composer audit

Useful options:

# only the packages your site runs in production
composer audit --no-dev

# machine-readable output, for CI
composer audit --format=json

# check the lock file without installing anything
composer audit --locked

If Composer says the command does not exist, update Composer itself with composer self-update. composer audit exits with a non-zero code when it finds advisories, so you can add it to a CI pipeline and fail the build.

What to do with the results

  1. Start with what runs in production. Packages from packages-dev (test tools, debuggers) usually never reach your live server. Check that they really don't.
  2. Read the advisory. Many only matter if you use a certain feature, such as a specific file upload or cache driver. The link takes you to the source.
  3. Update inside your major version first. composer update vendor/package --with-dependencies gets the newest version your composer.json allows. Most projects ship fixes for older release lines too.
  4. If the fix needs a new major version, plan it as an upgrade: read the upgrade guide, run your tests, and deploy it on its own.
  5. Run composer audit again and commit the new composer.lock.

Limits

A clean result means none of your installed versions match a published advisory today. It does not check your own code, your server, private packages or anything that has not been reported. Development branches such as dev-main have no version number, so we list them as not checked.

Questions

Do you keep my composer.lock?

No. The file is read into memory, checked and thrown away when the page is sent back. It is not saved, cached or logged. Only the package names are sent to Packagist to look up advisories; versions and everything else stay on our server for the length of the request.

Is this the same as composer audit?

It uses the same source, the Packagist security advisories API, and the same version ranges. composer audit runs on your machine and can also flag abandoned packages. This page is for when you only have the lock file to hand, or want a readable list to share.

Why upload composer.lock and not composer.json?

composer.json holds version ranges such as ^10.0. composer.lock records the exact version that is installed, and advisories apply to exact versions.

A package shows as affected but I cannot upgrade. What now?

Read the advisory first: many only matter if you use a certain feature. If it applies to you, look for a patch release on your current major version, since most projects fix older branches too. If none exists, plan the upgrade, or ask us to do it.

Does a clean result mean my site is secure?

No. It means none of your installed versions fall inside a known advisory range today. Your own code, server setup and private packages are not checked, and new advisories are published every week.

Related

Want us to patch these for you? Laskyr does PHP and Laravel security fixes and upgrades, from a single package bump to a major framework upgrade.

Get in touch

First hour checklist

If the site was just hacked, read the emergency kit before you delete files. The page is free. Email is optional.

Read the emergency kit