GHSA-39vw-qp34-rmwf: Serde yaml Uncontrolled Recursion Leads To Abort Vulnerability

MODERATE
CWE-674
Published
Advisory Summary

GHSA-39vw-qp34-rmwf is a MODERATE uncontrolled recursion leads to abort vulnerability (CWE-674: Uncontrolled Recursion) affecting Serde yaml libraries in the crates.io ecosystem. The issue involves uncontrolled recursion leads to abort in deserialization. Remediation is available by upgrading affected packages to version 0.8.4.

GHSA-39vw-qp34-rmwf at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-39vw-qp34-rmwf
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-674: Uncontrolled Recursion
Affected Product Serde yaml
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-39vw-qp34-rmwf

To remediate this vulnerability, upgrade all affected Serde yaml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

serde_yaml fixed: 0.8.4
Upgrade serde_yaml to 0.8.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for serde_yaml

How to Check if You Are Affected

To determine whether your application is affected by GHSA-39vw-qp34-rmwf, inspect your project dependencies for Serde yaml:

inspect dependencies for serde_yaml

Analyze the terminal output to locate any version of Serde yaml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In Serde yaml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

GHSA-39vw-qp34-rmwf Affected Serde yaml Versions

1 component(s)
Fixed Versions:
0.8.4
Product / Package Ecosystem Affected Versions Fixed Version
serde_yaml
crates.io
≥ 0.6.0-rc1
< 0.8.4
0.8.4

References

Frequently Asked Questions

What is GHSA-39vw-qp34-rmwf?
GHSA-39vw-qp34-rmwf is a security vulnerability in Serde yaml involving Uncontrolled recursion leads to abort in deserialization under CWE-674: Uncontrolled Recursion.
Which Serde yaml versions are affected?
Affected versions include releases prior to 0.8.4 across affected packages: serde_yaml.
What version fixes GHSA-39vw-qp34-rmwf?
Upgrading to 0.8.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is serde_yaml affected?
Yes, serde_yaml is affected in releases prior to 0.8.4. Upgrade your dependency to 0.8.4 or later.
What CWE is associated with GHSA-39vw-qp34-rmwf?
GHSA-39vw-qp34-rmwf is classified under CWE-674: Uncontrolled Recursion (The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.).
How can I check crates.io dependencies for GHSA-39vw-qp34-rmwf?
Run the dependency tree command: 'inspect dependencies for serde_yaml'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-39vw-qp34-rmwf",
  "modified" : "2023-06-13T21:03:35Z",
  "published" : "2021-08-25T21:00:18Z",
  "aliases" : [ ],
  "summary" : "Uncontrolled recursion leads to abort in deserialization",
  "details" : "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.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "serde_yaml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.6.0-rc1"
      }, {
        "fixed" : "0.8.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dtolnay/serde-yaml/pull/105"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dtolnay/serde-yaml/commit/b93aff6e904cffbbfd1f421b82f6dcc5ca19a4fd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dtolnay/serde-yaml"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2018-0005.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-674" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-06T17:45:03Z",
    "nvd_published_at" : null
  }
}