Stack Exhaustion in yaml-cpp (CVE-2019-6292)

yaml-cpp Updated 02 Oct 2025

Summary

15/01/2019
N/A
Yes i
Medium
6.5

CVE-2019-6292: An issue was discovered in singledocparser.cpp in yaml-cpp (aka LibYaml-C++) 0.6.2. Affects yaml-cpp across 2 version ranges.

< 0.6.3-1 < 562aefc114938e388457e6a531ed7b54d9dc1b62

Fixed in 0.6.3-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

yaml-cpp is a C++ library for parsing and emitting YAML (YAML Ain't Markup Language) files. It provides functionality for reading and writing YAML files in a simple and intuitive manner. The library is widely used in various applications and systems that require YAML file processing. However, a vulnerability has been discovered in yaml-cpp version 0.6.2, which can lead to stack exhaustion and denial-of-service attacks.

Vulnerability Detail

The vulnerability (CVE-2019-6292) originates from a stack consumption problem caused by recursive stack frames in the YAML::SingleDocParser component of yaml-cpp. Specifically, the following functions are affected: HandleCompactMap, HandleMap, HandleFlowSequence, HandleSequence, and HandleNode. This vulnerability can be exploited by remote attackers to trigger a denial-of-service condition by providing a specially crafted YAML file. The excessive stack consumption can exhaust the available stack space, leading to a crash or system instability.

How To Fix

Minimum fixed version

0.6.3-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade yaml-cpp

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid processing untrusted or unknown YAML files until the library is updated to a fixed version. By limiting the exposure to potentially malicious YAML files, the risk of exploitation can be reduced. However, this workaround may not be feasible in all scenarios, especially when YAML file processing is an essential part of the application or system functionality.

Conclusion

The vulnerability in yaml-cpp (CVE-2019-6292) can lead to stack exhaustion and denial-of-service attacks. It is crucial to update to the latest version of yaml-cpp (0.6.3-1 or later) to fix the vulnerability and ensure the proper handling of YAML files. Users should also exercise caution when processing YAML files from untrusted sources. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for yaml-cpp →

Share this vulnerability

FAQ

yaml-cpp is a C++ library for parsing and emitting YAML files. It provides a convenient interface for working with YAML data in C++ applications.

The vulnerability can lead to a denial-of-service condition, causing the affected application or system to crash or become unstable. This can result in service disruption and potential data loss.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will analyze it for any open-source vulnerabilities, including this one.

Yes, a fix is available in yaml-cpp version 0.6.3-1 or later. It is recommended to update your yaml-cpp installation to the latest version to mitigate the risk of exploitation.

As a temporary workaround, you can avoid processing untrusted or unknown YAML files until the library is updated. This can help reduce the risk of exploitation. However, it may not be feasible in all scenarios.

Related vulnerabilities

Recent vulnerabilities recorded for yaml-cpp.

How To Fix

Minimum fixed version

0.6.3-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade yaml-cpp

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback