# CVE-2026-59870: js-yaml quadratic-complexity denial of service via YAML11_SCHEMA !!omap parsing

> Attackers can cause CPU exhaustion and denial of service by submitting crafted YAML documents with ordered maps to applications using the js-yaml library.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Jul 2026
- **Updated:** 6 Oct 2026
- **Also known as:** CLSA-2026-1787592038, CLSA-2026-1790944389, CLSA-2026-1790950175, CLSA-2026-1792755810, GHSA-724g-mxrg-4qvm, UBUNTU-CVE-2026-59870

## What is CVE-2026-59870?

CVE-2026-59870 is a high-severity denial of service vulnerability in nodeca js-yaml, published on 8 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

js-yaml is a JavaScript YAML parser and dumper. Prior to 3.15.1, 4.3.1, and 5.2.1, YAML11_SCHEMA support for the !!omap tag in src/tag/sequence/omap.ts uses omapTag.addItem() to perform a linear duplicate-key scan on every insertion, causing O(n^2) CPU consumption when yaml.load() parses a crafted ordered-map document. In v3 and v4, !!omap is active and exploitable by default. v5 doesn't use !!omap by default, and the chances of activating it are very low.This issue is fixed in 3.15.1, 4.3.1, and 5.2.1.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-407 (Inefficient Algorithmic Complexity)

## Which versions are affected by CVE-2026-59870?

2 open source packages ship an affected version, including js-yaml. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `js-yaml` | npm | From 5.0.0 | 5.2.1 |
| `js-yaml` | npm | From 5.0.0 | 5.2.1 |

Products: Nodeca Js-Yaml.

## How do I fix CVE-2026-59870?

Upgrade js-yaml to 5.2.1 or later.

## Is CVE-2026-59870 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59870 exists.

## Other vulnerabilities in nodeca js-yaml

- [CVE-2026-59869](https://insights.sbomify.com/CVE-2026-59869/): js-yaml: YAML merge-key chains can force quadratic CPU consumption (high 7.5)
- [CVE-2013-4660](https://insights.sbomify.com/CVE-2013-4660/): Deserialization Code Execution in js-yaml (medium 6.8)
- [CVE-2026-59868](https://insights.sbomify.com/CVE-2026-59868/): js-yaml: YAML merge-key chains can force quadratic CPU consumption (medium 5.3)
- [CVE-2026-53550](https://insights.sbomify.com/CVE-2026-53550/): js-yaml: Quadratic-complexity DoS in merge key handling via repeated aliases (medium 5.3)
- [CVE-2025-64718](https://insights.sbomify.com/CVE-2025-64718/): js-yaml has prototype pollution in merge (<<) (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-59870 and fix it if it is affected.

What it is: CVE-2026-59870 is a high-severity denial of service vulnerability in nodeca js-yaml, published on 8 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59870 exists.

Affected packages and fixed versions:
- js-yaml (npm): affected from 5.0.0; fixed in 5.2.1
- js-yaml (npm): affected from 5.0.0; fixed in 5.2.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-59870/ (Markdown: https://insights.sbomify.com/CVE-2026-59870/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-59870
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-59870
- OSV: https://osv.dev/vulnerability/CVE-2026-59870

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-59870/
Summaries are generated and may contain mistakes; the official description above is the record.
