Check yarn.lock for vulnerable dependencies

Upload or paste your yarn.lock. We check every JavaScript package version in it against OSV.dev and email you the vulnerable ones, the version that fixes them and the Yarn command to upgrade. Free, and no account needed.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

About yarn.lock

yarn.lock is written by Yarn next to package.json. Both Yarn 1 (classic) and Yarn 2+ (Berry) lockfiles record the exact resolved version of every package.

To write or refresh it:

yarn install

Commit yarn.lock; yarn install --frozen-lockfile (Yarn 1) or --immutable (Yarn 2+) fails in CI when it is out of date.

Good to know

  • package.json cannot be checked: it has version ranges.
  • One package can appear in several versions (different parents need different ranges): each version is checked.

Fixing a vulnerable package

The report gives the fixed version for each vulnerable package (FIXED below). With Yarn:

# Yarn 1
yarn upgrade package@FIXED
# Yarn 2 and later
yarn up package@FIXED

For an indirect dependency, upgrade the parent package, or force the version with "resolutions" in package.json, then run yarn install.

Then run your tests and commit the updated yarn.lock.

yarn audit (Yarn 1) or yarn npm audit (Yarn 2+) and this check

Both use npm's advisory service. This check needs nothing installed and groups advisories per package with one target version.

Other lockfiles

Last updated .