---
id: CVE-2026-59868
title: js-yaml is a JavaScript YAML parser and dumper
summary: >-
  js-yaml is a JavaScript YAML parser and dumper. From 5.0.0 before 5.2.0, when
  merge keys are enabled, js-yaml can spend quadratic CPU time parsing a
  document whose size grows only linearly when a chain of mappings uses merge
  keys where e…
severity: medium
cvss: 5.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'
cwe:
  - CWE-407
  - CWE-770
vendor: nodeca
product: js-yaml
affected:
  - 'js-yaml >= 5.0.0, < 5.2.0'
patched:
  - js-yaml 5.2.0
published: '2026-07-08'
updated: '2026-07-13'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-59868'
references:
  - url: >-
      https://github.com/nodeca/js-yaml/commit/3105455b81dee69e0fd36e09ac0b2ccfdb54adc1
    label: security-advisories@github.com
  - url: 'https://github.com/nodeca/js-yaml/releases/tag/5.2.0'
    label: security-advisories@github.com
  - url: 'https://github.com/nodeca/js-yaml/security/advisories/GHSA-g796-fgmg-93mv'
    label: security-advisories@github.com
  - url: 'https://github.com/nodeca/js-yaml/security/advisories/GHSA-g796-fgmg-93mv'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
epss: 0.00644
epssPercentile: 0.48604
ingestedAt: '2026-07-13T15:27:34.151Z'
---

## Overview

js-yaml is a JavaScript YAML parser and dumper. From 5.0.0 before 5.2.0, when merge keys are enabled, 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 version 5.2.0.

## Affected

- `js-yaml >= 5.0.0, < 5.2.0`

## Remediation

Upgrade past the affected range:

- `js-yaml 5.2.0`
