Denial of Service in js-yaml

js-yaml Updated 02 Oct 2025

Summary

05/06/2019
MODERATE
Yes i
Moderate
5.9

GHSA-2pr6-76vf-7546: Denial of Service in js-yaml. Affects js-yaml versions < 3.13.0. Fixed in 3.13.0. 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

The js-yaml package is an open-source JavaScript library that allows parsing and serializing YAML files. It is commonly used in Node.js applications for handling YAML data. However, versions prior to 3.13.0 are vulnerable to a Denial of Service (DoS) attack. This means that by parsing a specially crafted YAML file, an attacker can cause the Node.js process to stall and potentially exhaust system resources, leading to a DoS condition.

Vulnerability Detail

The vulnerability in js-yaml arises from a flaw in the parsing mechanism. When a maliciously crafted YAML file is processed, the parsing process becomes stuck, causing the Node.js process to hang indefinitely. This can result in resource exhaustion and a DoS condition, rendering the affected application unresponsive. The vulnerability has a CVSS score of 5.9, indicating a moderate severity level.

How To Fix

Latest published version: 5.5.0 as of 23 Oct 2026

npm install js-yaml@5.5.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.13.0

This is the first release that contains the fix.

npm install js-yaml@3.13.0

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

Conclusion

In conclusion, the js-yaml package versions prior to 3.13.0 are vulnerable to a Denial of Service attack. To mitigate this vulnerability, it is crucial to upgrade to version 3.13.0 or higher. This will ensure the necessary patches are applied to prevent the parsing process from stalling and causing a DoS condition. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for js-yaml →

Share this vulnerability

FAQ

The vulnerability can lead to a Denial of Service condition, causing the affected application to become unresponsive and potentially impacting its availability.

At the moment, there is no known workaround for this vulnerability. It is recommended to upgrade to the fixed version of the js-yaml package.

No, only versions prior to 3.13.0 are vulnerable. It is crucial to update to version 3.13.0 or higher to mitigate the risk.

Yes, this vulnerability can be exploited remotely by providing a specially crafted YAML file to the affected application.

There is no known instance of this vulnerability being exploited in the wild. However, it is recommended to apply the necessary updates to prevent any potential attacks.

Related vulnerabilities

Recent vulnerabilities recorded for js-yaml.

How To Fix

Latest published version: 5.5.0 as of 23 Oct 2026

npm install js-yaml@5.5.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.13.0

This is the first release that contains the fix.

npm install js-yaml@3.13.0

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