Repository navigation
chore(deps): update devdependency js-yaml to v4.3.2 [security] - #351
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
November 18, 2025 23:43
827659c to
2586704
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
December 3, 2025 16:14
2586704 to
16867e0
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
December 31, 2025 18:02
16867e0 to
0e3f57f
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
January 8, 2026 20:44
0e3f57f to
189d645
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
2 times, most recently
from
January 23, 2026 20:54
2b6792d to
1e7ea42
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
February 2, 2026 16:05
1e7ea42 to
0100ccb
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
2 times, most recently
from
February 17, 2026 18:41
3d5f6e6 to
cafbb44
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
March 5, 2026 17:02
cafbb44 to
203c858
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
March 13, 2026 13:14
203c858 to
6d414f1
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
3 times, most recently
from
April 1, 2026 22:09
4cf3d35 to
bdf7f51
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
April 8, 2026 16:14
bdf7f51 to
ae61ccc
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
3 times, most recently
from
April 29, 2026 18:00
5561ee0 to
b81b09a
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
May 12, 2026 13:52
b81b09a to
e91c870
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
June 2, 2026 00:31
3a4ec06 to
06dc43c
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
June 11, 2026 22:02
06dc43c to
7d9a747
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
2 times, most recently
from
July 16, 2026 18:54
9147ef7 to
7a8d4cb
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
2 times, most recently
from
July 24, 2026 22:45
7eab46a to
a7bdfc3
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
July 30, 2026 19:33
a7bdfc3 to
15d03c4
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
2 times, most recently
from
August 16, 2026 11:47
17f4a14 to
69d3b5a
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
August 26, 2026 23:01
69d3b5a to
e17ea59
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
5 times, most recently
from
September 9, 2026 15:40
d0b3abc to
c7d8d4d
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
September 10, 2026 22:14
c7d8d4d to
a390e9f
Compare
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
2 times, most recently
from
September 20, 2026 03:53
72f5ffd to
1419ee0
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
3 times, most recently
from
October 1, 2026 00:14
ae84e9c to
fcfee10
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
October 5, 2026 20:11
fcfee10 to
3ff9ff3
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
October 13, 2026 14:01
3ff9ff3 to
fd96a5b
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
2 times, most recently
from
October 22, 2026 17:28
16ed112 to
f894f16
Compare
renovate
Bot
force-pushed
the
renovate/npm-js-yaml-vulnerability
branch
from
October 26, 2026 20:30
f894f16 to
0452d9c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.1.0→4.3.2js-yaml has prototype pollution in merge (<<)
CVE-2025-64718 / GHSA-mh29-5h37-fv8m
More information
Details
Impact
In js-yaml 4.1.0, 4.0.0, and 3.14.1 and below, it's possible for an attacker to modify the prototype of the result of a parsed yaml document via prototype pollution (
__proto__). All users who parse untrusted yaml documents may be impacted.Patches
Problem is patched in js-yaml 4.1.1 and 3.14.2.
Workarounds
You can protect against this kind of attack on the server by using
node --disable-proto=deleteordeno(in Deno, pollution protection is on by default).References
https://cheatsheetseries.owasp.org/cheatsheets/Prototype_Pollution_Prevention_Cheat_Sheet.html
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
JS-YAML: Quadratic-complexity DoS in merge key handling via repeated aliases
CVE-2026-53550 / GHSA-h67p-54hq-rp68
More information
Details
Summary
A crafted YAML document can trigger algorithmic CPU exhaustion in
js-yamlmerge-key processing (<<) by repeating the same alias many times in a merge sequence.This causes quadratic parse-time behavior relative to input size and can block a Node.js worker/event loop for seconds with a relatively small payload (tens of KB), resulting in denial of service.
Details
The issue is in merge handling inside
lib/loader.js:storeMappingPair(...)iterates every element of a merge sequence when key tag istag:yaml.org,2002:merge.mergeMappings(...).mergeMappings(...)computesObject.keys(source)and performs_hasOwnProperty.call(destination, key)checks for each key.When input is of the form:
a: &a {k0:0, k1:0, ..., kK:0}
b: {<<: [*a, *a, *a, ... repeated M times ...]}
all *a entries refer to the same anchored object. After the first merge, subsequent merges are semantically no-ops, but the parser still reprocesses all keys each time.
Resulting work is O(K * M), while input size is O(K + M), giving quadratic scaling as payload grows.
Relevant code path:
lib/loader.js in storeMappingPair(...) merge branch (keyTag === 'tag:yaml.org,2002:merge')
lib/loader.js mergeMappings(...)
Root cause
File: lib/loader.js
Function: storeMappingPair(state, _result, overridableKeys, keyTag, keyNode,
valueNode, startLine, startLineStart, startPos)
Lines: ~359-366
When the merge value is a sequence (YAML 1.1 <<: [ *a, *a, ... ]), each element
is handed to mergeMappings() without deduplication. mergeMappings() then does
Every alias reference in the sequence resolves (by design) to the SAME object
via state.anchorMap. After the first merge, every subsequent merge of that same
reference is a pure no-op semantically, but still performs:
Total: M * K hasOwnProperty checks + M Object.keys allocations, while the final
object and all observable side effects are identical to a single merge.
YAML semantics for
<<:are idempotent and commutative over duplicate sources,so collapsing duplicates preserves behavior exactly; this isn't a spec trade-off.
PoC
Environment:
js-yaml version: 4.1.1
Node.js: v24.5.0
Platform: arm64 macOS (reproduced consistently)
Reproduction script:
Create many keys in one anchored map (&a).
Merge that same alias repeatedly via <<: [*a, *a, ...].
Measure parse time and compare with control payload using single merge (<<: *a).
Observed repeated runs (same machine):
K=M=1000, input 9,909 bytes: ~33–36 ms
K=M=2000, input 20,909 bytes: ~121–123 ms
K=M=4000, input 42,909 bytes: ~524–537 ms
K=M=6000, input 64,909 bytes: ~1,608–1,829 ms
K=M=8000, input 86,909 bytes: ~3,395–3,565 ms
Control (single merge, similar key counts):
K=2000: ~1–2 ms
K=4000: ~3 ms
K=8000: ~5 ms
Also verified: repeated-merge output equals single-merge output (same key count and same JSON), confirming excess time is redundant computation.
Impact
This is a denial-of-service vulnerability (CPU exhaustion / algorithmic complexity).
Any service parsing untrusted YAML with js-yaml can be impacted, including API backends, CI tools, config processors, and automation services. An attacker can submit crafted YAML to significantly increase CPU time and reduce availability.
Suggested fix:
Dedupe the merge source list by reference before invoking mergeMappings. Any of
the following are minimal and preserve YAML 1.1 merge semantics:
dedupe in storeMappingPair:
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
js-yaml: YAML merge-key chains can force quadratic CPU consumption
CVE-2026-59869 / GHSA-52cp-r559-cp3m
More information
Details
Impact
js-yaml can spend quadratic CPU time parsing a document whose size grows only linearly. The issue is triggered by a chain of mappings where each mapping merges the previous one:
For each new mapping, the loader has to enumerate the keys inherited from the previous mapping. With N chained mappings, this results in roughly 1 + 2 + ... + N merged-key visits, i.e., O(N^2) work for O(N) input size.
PoC
From N = 4000 delay become > 1s (doc size < 100K)
Patches
Fix released. The most robust protection is to limit the total number of merged keys per parse call. This should close all past and future edge cases with merge. The default 10K-key limit should be okay in most cases.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backported
GHSA-5p4m-2wfm-xmqj
More information
Details
Quadratic CPU consumption in
!!omapresolution (js-yaml 3.x and 4.x)Summary
resolveYamlOmap()enforces key uniqueness for!!omapsequences with a linearscan (
objectKeys.indexOf(...)) inside the per-element loop, making resolutionO(n²) in the number of entries. A modestly sized YAML document therefore
consumes disproportionate CPU inside
yaml.load(), giving a denial of serviceagainst any consumer that parses untrusted YAML.
!!omapis registered in the default schema(
lib/schema/default.js→require('../type/omap')), so a plainyaml.load(untrustedInput)with no options is affected — no custom schema ornon-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.
Affected versions
objectKeys.indexOf(pairKey)atlib/type/omap.js:29objectKeys.indexOf(pairKey)atlib/type/omap.js:30Set)Both figures are the newest release of each line at the time of writing, so
this is not a "you are on an old version" issue.
Details
lib/type/omap.js(js-yaml 4.3.0):objectKeysgrows by one element per entry, andArray.prototype.indexOfis alinear scan, so resolving an
n-entry!!omapperforms roughly1 + 2 + … + ncomparisons — quadratic inn. The work happens synchronouslyinside
yaml.load(), blocking the event loop for its whole duration.The 5.x line already solves exactly this by tracking seen keys in a
Set(
src/tag/sequence/omap.ts):Proof of concept
Measured (node v20.20.2, default heap, no flags)
js-yaml 4.3.0
js-yaml 3.15.0
Runtime grows by a factor of ~4 for each doubling of
n, which is thesignature of O(n²) (linear growth would be ~2×).
Scaling further: a 2.48 MB document with 150,000 entries blocked
yaml.load()for 10.8 seconds.Impact
Any service that parses attacker-influenced YAML with js-yaml 3.x or 4.x can be
stalled with a small input. Because the loop is synchronous, a single request
blocks the Node.js event loop and stalls every other request in the process —
so the amplification is per-process, not just per-request.
Suggested severity: consistent with CVE-2026-59870 (the same weakness in
5.x), i.e. Availability-only impact, network attack vector, no privileges or
user interaction required.
Suggested fix
Mirror the 5.x fix — replace the linear scan with a
Set:This preserves the existing duplicate-key rejection semantics exactly while
making resolution O(n). A
maxOmapLength-style cap would also work, but theSetmatches what 5.x already ships and requires no new option.References
lib/type/omap.js(3.x, 4.x) — the affected resolverlib/schema/default.js— registers!!omapin the default schemaDiscovery
Found by an automated static-analysis and executed-proof-of-concept scanner run
against js-yaml 4.2.0, then manually verified against 3.15.0 and 4.3.0 by
executing the proof of concept above. All timings in this report were measured
on the current releases of each line, not on the version originally scanned.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources
CVE-2026-84375 / GHSA-2883-xcg3-v3hh
More information
Details
Summary
maxTotalMergeKeysdoes not count empty mappings. An attacker can repeatedly merge a large sequence of them and consume significant CPU without reaching the configured limit.Example
For every target, the loader iterates all
Nelements ofarr. This results inO(N * K)work whiletotalMergeKeysremains unchanged.PoC
Observed results:
Impact
An attacker can submit a relatively small YAML document that causes prolonged CPU consumption despite the default
maxTotalMergeKeyslimit.Fix
Count each merge-source mapping as one budget unit, in addition to counting its keys.
Difference with v5
In v3 & v4, merge is enabled by default. So, the severity score is higher.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nodeca/js-yaml (js-yaml)
v4.3.2Compare Source
v4.3.1Compare Source
v4.3.0Compare Source
Security
maxTotalMergeKeysoption.v4.2.0Compare Source
Added
docs/safety.mdwith notes about processing untrusted YAML.maxDepth(100) loader option. Not a problem, but gives a betterexception instead of RangeError on stack overflow.
mergefix, but an additional restriction for safety.dist/builds.Changed
dist/files are no longer kept in the repository.Fixed
Security
elements (makes sense for malformed files > 10K).
v4.1.1Compare Source
Security
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.