Advisory

RUSTSEC-2018-0006

Also known as: CVE-2018-20993, GHSA-hv87-47h9-jcvq

Summary

Uncontrolled recursion leads to abort in deserialization

Details

Affected versions of this crate did not prevent deep recursion while
deserializing data structures.

This allows an attacker to make a YAML file with deeply nested structures
that causes an abort while deserializing it.

The flaw was corrected by checking the recursion depth.

Note: clap 2.33 is not affected by this because it uses yaml-rust
in a way that doesn't trigger the vulnerability. More specifically:

  1. The input to the YAML parser is always trusted - is included at compile

time via include_str!.

  1. The nesting level is never deep enough to trigger the overflow in practice

(at most 5).

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2018-09-17 12:00 UTC
Modified
2023-11-08 04:00 UTC

Affected packages and fixes

yaml-rust

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.4.1 (semver)

Fixed versions

0.4.1

Fix

  • Fixed version 0.4.1
    cargo update -p yaml-rust --precise 0.4.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences