Two kinds of RustSec advisory#
The RustSec database holds advisories as TOML front matter plus Markdown. A vulnerability advisory and an informational one differ in a single field. The advisory-db README documents it:
# Optional: Indicates the type of informational security advisory
# - "unsound" for soundness issues
# - "unmaintained" for crates that are no longer maintained
# - "notice" for other informational notices
#informational = "unmaintained"
Compare two real advisories from that commit. RUSTSEC-2021-0139 for ansi_term:
[advisory]
id = "RUSTSEC-2021-0139"
package = "ansi_term"
date = "2021-08-18"
url = "https://github.com/ogham/rust-ansi-term/issues/72"
informational = "unmaintained"
[versions]
patched = []
RUSTSEC-2024-0421 for idna:
[advisory]
id = "RUSTSEC-2024-0421"
package = "idna"
date = "2024-12-09"
categories = ["privilege-escalation"]
keywords = ["idna", "punycode", "same-origin", "domain-name"]
aliases = ["CVE-2024-12224", "GHSA-h97m-ww89-6jmq"]
url = "https://bugzilla.mozilla.org/show_bug.cgi?id=1887898"
[versions]
patched = [">= 1.0.0"]
The first has informational = "unmaintained", no category, no CVE alias and an empty patched list. Its text says "The maintainer has advised that this crate is deprecated and will not receive any maintenance" and that the crate "may or may not be ok to use as-is." The second names an impact category, carries a CVE and has a patched range.
The database's policy for unmaintained advisories states their purpose: they "inform the Rust community about both the existence of unmaintained crates within a particular project, and also serve to guide switching to maintained alternatives." A crate qualifies when it is "Explicitly unmaintained" or "Implicitly unmaintained: the author is incommunicado for a prolonged period of time."
How cargo audit reports each#
cargo-audit 0.23.0 (installed with cargo install cargo-audit --locked, cargo 1.100.0) ran against a constructed crate that depends on ansi_term = "=0.12.1" and idna = "=0.5.0". The database was a clone of rustsec/advisory-db at commit 10db699..., passed with --db and --no-fetch:
$ cargo audit --db .../advisory-db --no-fetch
Loaded 1567 security advisories (from .../advisory-db)
Scanning Cargo.lock for vulnerabilities (9 crate dependencies)
Crate: idna
Version: 0.5.0
Title: `idna` accepts Punycode labels that do not produce any non-ASCII when decoded
Date: 2024-12-09
ID: RUSTSEC-2024-0421
URL: https://rustsec.org/advisories/RUSTSEC-2024-0421
Solution: Upgrade to >=1.0.0 (patched)
Crate: ansi_term
Version: 0.12.1
Warning: unmaintained
Title: ansi_term is Unmaintained
Date: 2021-08-18
ID: RUSTSEC-2021-0139
URL: https://rustsec.org/advisories/RUSTSEC-2021-0139
Solution: No fixed upgrade is available!
error: 1 vulnerability found!
warning: 1 allowed warning found
The command exited 1. The vulnerability is an error with an upgrade path. The unmaintained advisory is a warning, marked by the Warning: line. The JSON report (--json) keeps them in separate sections, vulnerabilities.list for RUSTSEC-2024-0421 with "informational": null, and warnings.unmaintained for RUSTSEC-2021-0139.
After raising idna to 1.0.0, the same scan printed only the ansi_term warning and warning: 1 allowed warning found, and exited 0. A CI job keyed on exit status passes. To make it fail, pass -D unmaintained (the help text reads "exit with an error on: warnings (any), unmaintained, unsound, yanked"); the run then printed error: 1 denied warning found! and exited 1. The example configuration sets the same policy in audit.toml with deny = ["unmaintained"].
The decision for this crate is a migration. The advisory lists possible alternatives and says the list "has not been vetted in any way." cargo tree -i ansi_term shows it is a direct dependency of the crate, so the migration is a change in this repository:
$ cargo tree -i ansi_term
ansi_term v0.12.1
└── report-cli v0.1.0 (.../app)
When the unmaintained crate arrives through another dependency, the same command names the parent, and the plan becomes upgrading or replacing that parent.
When unmaintained comes with an unpatched vulnerability#
The warning is only informational while no vulnerability is known. An unmaintained crate that later receives a vulnerability advisory has nobody to release the fix, so patched stays empty and the only remedy is the migration you postponed.
rustc-serialize is in that state. Its unmaintained advisory, RUSTSEC-2025-0025, says: "By fuzzing the package, we can identify multiple vulnerabilities." Its vulnerability advisory, RUSTSEC-2022-0004, names the affected function and no patch:
categories = ["denial-of-service"]
[versions]
patched = []
[affected]
functions = { "rustc_serialize::json::Json::from_str" = ["*"] }
A constructed config loader that reads JSON from standard input with Json::from_str gets both findings:
$ cargo audit --db .../advisory-db --no-fetch
Crate: rustc-serialize
Version: 0.3.25
Title: Stack overflow in rustc_serialize when parsing deeply nested JSON
ID: RUSTSEC-2022-0004
Solution: No fixed upgrade is available!
Crate: rustc-serialize
Version: 0.3.25
Warning: unmaintained
Title: rustc-serialize is unmaintained
ID: RUSTSEC-2025-0025
Solution: No fixed upgrade is available!
error: 1 vulnerability found!
warning: 1 allowed warning found
The advisory's own reproduction input, fed to the program, kills the process:
$ echo '{"a":[1,2]}' | ./target/debug/cfg-loader
parsed: true
$ python3 -c "print('[0,['*10000)" | ./target/debug/cfg-loader
thread 'main' (860) has overflowed its stack
fatal runtime error: stack overflow, aborting
$ echo $?
134
Here "No fixed upgrade is available" means none is expected: the advisory says the project has been archived. If the JSON comes from a request, a queue or a user upload, the migration to a maintained parser is the urgent fix. The cargo-audit README describes --ignore for a narrow case: "there may be situations where an upgrade isn't available and the advisory doesn't affect your application. For example the advisory might involve a cargo feature or API that is unused." If nothing calls Json::from_str, or it only reads a file you ship, that applies; record the search that showed it, and keep the migration on the plan.
Decide from the advisory kind and what you call#
| What cargo audit says | Evidence to collect | Decision |
|---|---|---|
| Error, vulnerability with a patched range | The Solution: line and the crate's parent in cargo tree -i | Upgrade now, or upgrade the parent |
| Warning, unmaintained, no other advisory on the crate | The advisory's alternatives and the dependency path | Plan a migration; set -D unmaintained if you want CI to hold the line |
Warning, unmaintained, plus a vulnerability with patched = [] | The advisory's affected functions and whether your code calls them on outside input | Migrate now if called on outside input; otherwise ignore by ID with the search recorded, and migrate on schedule |
| Warning, unsound | The unsound API and whether your code uses it | Avoid the API or migrate; judge urgency from the advisory text |
Clean scan, --no-fetch with an old database | The database commit and its date | Refresh the database before relying on the result |
The same reachability question for Go modules is in the guide to govulncheck's called-symbol results. When the migration arrives as an automated dependency update, the dependency bot review guide covers what to check before merging it.