Denial of Service Vulnerability in yaml-cpp

yaml-cpp Updated 02 Oct 2025

Summary

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

CVE-2019-6285: The SingleDocParser::HandleFlowSequence function in yaml-cpp (aka LibYaml-C++) 0.6.2 allows remote attackers to cause a denial of service (stack consumption and application crash) via a crafted YAML file. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

yaml-cpp is an open-source library for parsing and emitting YAML files. It is commonly used in various applications to handle YAML data. However, a vulnerability has been discovered in yaml-cpp version 0.6.2 that can lead to a denial of service attack.

Vulnerability Detail

The vulnerability, identified as CVE-2019-6285, exists in the SingleDocParser::HandleFlowSequence function of yaml-cpp. An attacker can exploit this vulnerability by providing a specially crafted YAML file. When the vulnerable function attempts to parse the malicious YAML file, it consumes excessive stack memory, leading to a stack overflow and subsequent application crash. This vulnerability can be exploited remotely, potentially impacting applications that use yaml-cpp to process user-supplied YAML data.

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

If upgrading to the latest version of yaml-cpp is not immediately feasible, a possible workaround is to implement input validation and sanitization mechanisms to filter out potentially malicious YAML files. By carefully validating and sanitizing user-supplied YAML data, the risk of exploitation can be mitigated. However, this workaround may not provide complete protection and upgrading to the fixed version is still strongly recommended.

Conclusion

In conclusion, the yaml-cpp library version 0.6.2 is vulnerable to a denial of service attack. To mitigate this vulnerability, it is recommended to upgrade to version 0.6.3-1 or later. Implementing input validation and sanitization mechanisms can provide temporary protection, but upgrading to the fixed version is the best long-term solution. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for yaml-cpp →

Share this vulnerability

FAQ

yaml-cpp is an open-source library for parsing and emitting YAML files. It provides functionality to handle YAML data in various applications.

The vulnerability allows remote attackers to cause a denial of service by crashing the application using a specially crafted YAML file.

To fix this vulnerability, upgrade yaml-cpp to version 0.6.3-1 or later.

Implementing input validation and sanitization mechanisms can mitigate the risk, but upgrading to the fixed version is strongly recommended.

There is no known exploit available for this vulnerability at the moment.

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