Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. js-yaml
  4. ›
  5. GHSA-5p4m-2wfm-xmqj

GHSA-5p4m-2wfm-xmqj: JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backported

August 6, 2026

resolveYamlOmap() enforces key uniqueness for !!omap sequences with a linear scan (objectKeys.indexOf(...)) inside the per-element loop, making resolution O(n²) in the number of entries. A modestly sized YAML document therefore consumes disproportionate CPU inside yaml.load(), giving a denial of service against any consumer that parses untrusted YAML.

!!omap is registered in the default schema (lib/schema/default.js → require('../type/omap')), so a plain yaml.load(untrustedInput) with no options is affected — no custom schema or non-default configuration is required.

This is the same weakness as CVE-2026-59870 / GHSA-724g-mxrg-4qvm, which was fixed in the 5.x line in 5.2.1. That fix was never backported: both currently maintained legacy lines still carry the original implementation.

References

  • github.com/advisories/GHSA-5p4m-2wfm-xmqj
  • github.com/nodeca/js-yaml/security/advisories/GHSA-5p4m-2wfm-xmqj

Code Behaviors & Features

Detect and mitigate GHSA-5p4m-2wfm-xmqj with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 3.0.0 before 3.15.1, all versions starting from 4.0.0 before 4.3.1

Fixed versions

  • 3.15.1
  • 4.3.1

Solution

Upgrade to versions 3.15.1, 4.3.1 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-407: Inefficient Algorithmic Complexity

Source file

npm/js-yaml/GHSA-5p4m-2wfm-xmqj.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:26 +0000.