Check Cargo.lock for vulnerable dependencies

Upload or paste your Cargo.lock. We check every Rust package version in it against OSV.dev and email you the vulnerable ones, the version that fixes them and the Cargo 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 Cargo.lock

Cargo.lock is written by Cargo next to Cargo.toml (at the workspace root in a workspace). It records the exact version of every crate in the build.

To write or refresh it:

cargo generate-lockfile

cargo build also writes it. Commit it: Cargo's guidance recommends this for libraries too.

Good to know

  • Cargo.toml cannot be checked: "1.2" means "1.2.0 or any later 1.x".
  • In a workspace, check the one Cargo.lock at the root.

Fixing a vulnerable package

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

# Upgrade one crate within its parents' ranges
cargo update -p crate
# Or to an exact version
cargo update -p crate --precise FIXED

cargo update -p works for indirect crates too; if a parent crate requires an older major version, upgrade the parent.

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

cargo audit and this check

cargo audit uses the RustSec advisory database, which OSV.dev includes. This check needs nothing installed and works for your other languages too.

Other lockfiles

Last updated .