Denial of Service Vulnerability in yaml-cpp Package - CVE-2018-20574

yaml-cpp Updated 03 Oct 2025

Summary

28/12/2018
N/A
No i
Medium
6.5

UBUNTU-CVE-2018-20574: The SingleDocParser::HandleFlowMap 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 versions 0.3.0-1 – 0.5.1-1. No fix is published. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

yaml-cpp is a YAML parser and emitter in C++ that allows developers to easily read and write YAML files. It is widely used in applications that require configuration files or data serialization. The package is known for its simplicity and efficiency, but it has been found to have vulnerabilities that can be exploited by attackers.

Vulnerability Detail

The vulnerability identified as CVE-2018-20574 exists in the SingleDocParser::HandleFlowMap function of yaml-cpp version 0.6.2. This flaw allows remote attackers to craft a malicious YAML file that can lead to a denial of service condition, causing stack consumption and application crashes. The vulnerability arises from improper handling of certain input, which can be exploited to exhaust system resources.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, avoid processing untrusted YAML files until the package has been updated. Implement input validation to ensure that only safe and expected YAML files are processed by your application.

Conclusion

CVE-2018-20574 is a significant vulnerability in the yaml-cpp package that can lead to denial of service attacks. Users are strongly advised to update their packages to the latest versions to protect their applications from potential exploitation.

See every vulnerability recorded for yaml-cpp →

Share this vulnerability

FAQ

CVE-2018-20574 is a vulnerability in the yaml-cpp package that allows attackers to cause a denial of service through crafted YAML files.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The primary impact is a denial of service, which can lead to application crashes and unavailability of services relying on yaml-cpp.

Yes, a patched version of yaml-cpp is available. Users should update to version 0.6.2-4ubuntu1 or later to mitigate the vulnerability.

The CVSS score for CVE-2018-20574 is 6.5, indicating a medium severity level.

Related vulnerabilities

Recent vulnerabilities recorded for yaml-cpp.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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