Intel

AIKIDO-2026-633502

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

Denial of Service (DoS)GHSA-5p4m-2wfm-xmqj Published 4 days ago

75

High Risk

This Affects:

JSjs-yaml
3.0.0 - 3.15.0
Fixed in 3.15.1
4.0.0 - 4.3.0
Fixed in 4.3.1
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.

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.

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.

How to fix this

Upgrade the js-yaml library to the patch version.