---
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
  - CWE-1333
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
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-59868.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-59868'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2498114'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-59868'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-59868'
  - url: 'https://access.redhat.com/errata/RHSA-2026:61783'
  - url: 'https://access.redhat.com/errata/RHSA-2026:34975'
  - url: 'https://access.redhat.com/errata/RHSA-2026:26994'
  - url: 'https://access.redhat.com/errata/RHSA-2026:9455'
  - url: 'https://access.redhat.com/errata/RHSA-2026:35272'
  - url: 'https://access.redhat.com/errata/RHSA-2026:34478'
  - url: 'https://access.redhat.com/errata/RHSA-2026:7378'
  - url: 'https://access.redhat.com/errata/RHSA-2026:33866'
  - url: 'https://access.redhat.com/errata/RHSA-2026:7655'
tags:
  - nvd
  - csaf
  - vex
  - red-hat
  - score-dispute
epss: 0.00644
epssPercentile: 0.5066
ingestedAt: '2026-07-13T15:27:34.151Z'
scores:
  nvd: 5.3
  vendor: 7.5
---

## 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`

## Vendor advisories

- **RHSA-2026:61783** · Red Hat · fixed in: Red Hat Discovery 2 · released 2026-08-31 · [advisory](https://access.redhat.com/errata/RHSA-2026:61783)
- **RHSA-2026:34975** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-02 · [advisory](https://access.redhat.com/errata/RHSA-2026:34975)
- **RHSA-2026:26994** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-06-18 · [advisory](https://access.redhat.com/errata/RHSA-2026:26994)
- **RHSA-2026:9455** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-04-21 · [advisory](https://access.redhat.com/errata/RHSA-2026:9455)
- **RHSA-2026:35272** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-03 · [advisory](https://access.redhat.com/errata/RHSA-2026:35272)
- **RHSA-2026:34478** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-01 · [advisory](https://access.redhat.com/errata/RHSA-2026:34478)
- **RHSA-2026:7378** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-04-10 · [advisory](https://access.redhat.com/errata/RHSA-2026:7378)
- **RHSA-2026:33866** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-06-30 · [advisory](https://access.redhat.com/errata/RHSA-2026:33866)
- **RHSA-2026:7655** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-04-11 · [advisory](https://access.redhat.com/errata/RHSA-2026:7655)
