Rust advisories / serde_yaml
Vulnerability MediumRUSTSEC-2018-0005 · serde_yaml
RUSTSEC-2018-0005: Uncontrolled recursion leads to abort in deserialization
Short answerA security vulnerability in the serde_yaml crate: Uncontrolled recursion leads to abort in deserialization. GitHub rates it Medium. Fixed in 0.8.4: update to a fixed version.
| Crate | serde_yaml |
|---|---|
| Type | Vulnerability |
| Affected versions | From 0.6.0-rc1 before 0.8.4. |
| Fixed in | 0.8.4 |
| Severity | Medium (GitHub rating) |
| Published | 2018-09-17 |
| Last changed | 2023-11-08 |
| Also known as | GHSA-39vw-qp34-rmwf |
What to do
- See which version you have:
cargo tree -i serde_yaml(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p serde_yaml. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleserde_yaml = "0.8.4") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
Affected versions of this crate did not properly check for recursion while deserializing aliases.
This allows an attacker to make a YAML file with an alias referring to itself causing an abort.
The flaw was corrected by checking the recursion depth.
References
- Package: crates.io/crates/serde_yaml
- Advisory: rustsec.org/advisories/RUSTSEC-2018-0005.html
- Web: github.com/dtolnay/serde-yaml/pull/105
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?