Cargo.lock vulnerability scanner
Scan a Cargo.lock for Rust crates with known vulnerabilities from RustSec and GitHub advisories. See the severity and the fixed version of each crate.
The file is read in your browser. Only package names and versions are sent to OSV when you scan.
This tool asks the OSV.dev vulnerability database directly from your browser. It sends the name, version and ecosystem of each package in the file, and then the IDs of the advisories that matched. The file itself, its paths, URLs and hashes stay in your browser, and nothing is sent to HardenKit.
How to use the cargo.lock vulnerability scanner
- Drop your Cargo.lock on the page, or paste its contents.
- Press the scan button to send the crate names and versions to OSV.dev.
- Read the table, worst first, with the fixed version of each crate.
- Upgrade with cargo update -p crate-name --precise version, then build, test and scan again.
About this tool
Cargo.lock records the exact version and checksum of every crate in a Rust build. Cargo.toml holds the ranges you asked for; the lockfile holds what Cargo chose, and it can hold two versions of one crate when different dependencies need different major versions. Both are compiled into your binary, so both are checked.
This scanner reads each [[package]] table and keeps the crates whose source is the crates.io registry. It asks OSV.dev about each name and version; OSV.dev carries the RustSec advisory database, kept by the Rust Secure Code working group, and GitHub’s advisories for Rust. Crates of your own workspace, path dependencies, git dependencies and crates from another registry are listed as not checked.
RustSec advisories often come without a severity rating, and the table says “Unknown” for those. That is a gap in the data, not a low rating: read the advisory before you set it aside. RustSec also publishes notices about unmaintained and yanked crates, which describe a risk and not a flaw. This page shows what OSV.dev returns for the version and does not tell the two apart.
Sources
Questions
cargo audit is the RustSec command-line tool; it reads Cargo.lock on your machine and checks it against the RustSec database. This page uses OSV.dev, which imports the same database and adds GitHub advisories, and needs no Rust toolchain.
For a binary or an application, yes: it makes builds reproducible and gives scanners exact versions. For a library the Cargo team no longer advises against it: a committed lockfile keeps CI stable, although the projects that depend on the library ignore it.
A crate without a source line is part of your own workspace or a path dependency, and a git source is a commit, not a published version. Neither can be matched against advisories written for crates.io releases, so the scanner lists them instead of guessing.
Run cargo update -p crate-name to move it to the newest version the ranges allow, or add --precise 1.2.3 to choose the version. If a parent crate pins an affected version, update the parent or wait for its next release.