Intel

AIKIDO-2026-633502

js-yaml is vulnerable to Denial of Service (DoS)

GHSA-5p4m-2wfm-xmqjPublished Aug 3, 2026
August 3, 2026

75

CVE Score

High

Denial of Service (DoS)

Are you affected? Scan for Free

TL;DR

The resolveYamlOmap resolver enforces key uniqueness for !!omap sequences with a linear indexOf scan inside a per-element loop, making resolution take quadratic time in the number of entries. Because !!omap is registered in the default schema, a plain yaml.load call on untrusted input with no options reaches this path. A modestly sized ordered-map document therefore consumes disproportionate CPU synchronously inside yaml.load, blocking the Node.js event loop and stalling the whole process. The fix replaces the linear duplicate-key scan with constant-time lookup so resolution runs in linear time.

How do I fix this?

Upgrade the js-yaml library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you parse untrusted or externally influenced YAML input.

Package

Versions

3.0.0 - 3.15.0

Fixed in 3.15.1

4.0.0 - 4.3.0

Fixed in 4.3.1

Background info

js-yaml is vulnerable to Denial of Service (DoS) in versions 3.0.0 - 3.15.0 and 4.0.0 - 4.3.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea