Description
js-yaml is a JavaScript YAML parser and dumper. From 3.0.0 until 3.15.2 and 4.3.2, maxTotalMergeKeys in lib/js-yaml/loader.js and lib/loader.js does not count empty mapping sources while processing the merge key <<. An attacker can alias a large sequence of empty mappings into many merge targets, causing O(N * K) processing while totalMergeKeys remains unchanged and the configured resource limit is never reached. A relatively small YAML document can therefore cause prolonged CPU consumption in applications that parse untrusted YAML, and merge processing is enabled by default on these release lines. This issue is fixed in versions 3.15.2 and 4.3.2.
Published: 2026-09-01
Score: 7.5 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

js-yaml, a JavaScript library for parsing and emitting YAML, contains a flaw in its merge key handling. The maxTotalMergeKeys counter does not count empty mapping sources, so an attacker can create a YAML document with a large number of empty mappings that are merged into many targets. The library still performs the merge, resulting in an O(N × K) processing load while the totalMergeKeys value never reaches the configured limit. In practice, a small YAML payload can trigger sustained high CPU usage, degrading or halting application performance and effectively denying service.

Affected Systems

The vulnerability affects the Nodeca js‑yaml library. All releases from 3.0.0 through 3.15.1 and from 4.0.0 through 4.3.1 have the bug. The issue was addressed in releases 3.15.2 and 4.3.2.

Risk and Exploitability

The CVSS score of 7.5 indicates high severity. No EPSS score is publicly available, and the flaw is not listed in the CISA KEV catalog. An attacker can exploit this by supplying a malicious YAML document to any application that parses YAML with js‑yaml, which is plausible for both local data ingestion and remote input if the application accepts untrusted YAML. The likely attack vector is via crafted YAML input that triggers the merge processing overhead, producing prolonged CPU consumption.

Generated by OpenCVE AI on September 2, 2026 at 04:38 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade js‑yaml to version 3.15.2 or newer, or 4.3.2 or newer, to apply the fix that correctly limits merge key processing.
  • If an upgrade is not immediately possible, configure the library to disable merge key handling or reject YAML content that triggers large merge operations, if such configuration is available.
  • Apply system‑level resource controls such as CPU limits or monitoring to detect and contain excessive CPU usage by applications that use js‑yaml.

Generated by OpenCVE AI on September 2, 2026 at 04:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 02 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-835
References
Metrics threat_severity

None

threat_severity

Important


Wed, 02 Sep 2026 00:00:00 +0000

Type Values Removed Values Added
First Time appeared Nodeca
Nodeca js-yaml
Vendors & Products Nodeca
Nodeca js-yaml

Tue, 01 Sep 2026 22:00:00 +0000

Type Values Removed Values Added
Description js-yaml is a JavaScript YAML parser and dumper. From 3.0.0 until 3.15.2 and 4.3.2, maxTotalMergeKeys in lib/js-yaml/loader.js and lib/loader.js does not count empty mapping sources while processing the merge key <<. An attacker can alias a large sequence of empty mappings into many merge targets, causing O(N * K) processing while totalMergeKeys remains unchanged and the configured resource limit is never reached. A relatively small YAML document can therefore cause prolonged CPU consumption in applications that parse untrusted YAML, and merge processing is enabled by default on these release lines. This issue is fixed in versions 3.15.2 and 4.3.2.
Title js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources
Weaknesses CWE-400
CWE-407
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-01T21:43:13.617Z

Reserved: 2026-09-01T16:27:58.129Z

Link: CVE-2026-84375

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-01T22:17:19.440

Modified: 2026-09-01T22:17:19.440

Link: CVE-2026-84375

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-01T21:43:13Z

Links: CVE-2026-84375 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-02T04:45:17Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-407

    Inefficient Algorithmic Complexity

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')