chore(deps): update pnpm-workspace.overrides markdownlint-cli2>js-yaml to ^4.3.2 [security] - #179
Conversation
Preview sitepr-179: https://pr-179--stuartclark.netlify.app Updated 2026-09-09T23:37:24Z |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #179 +/- ##
=======================================
Coverage 99.77% 99.77%
=======================================
Files 81 81
Lines 1340 1340
Branches 332 332
=======================================
Hits 1337 1337
Misses 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Lighthouse Audit ·
|
| Route | FCP | LCP | CLS | TBT | Perf |
|---|---|---|---|---|---|
/ |
✅ 2.8s |
✅ 3.0s |
✅ 0.009 |
✅ 49.500 |
✅ 0.90 |
/about |
✅ 2.6s |
✅ 3.1s |
✅ 0.178 |
✅ 6.500 |
✅ 0.82 |
/community |
✅ 2.6s |
✅ 2.7s |
✅ 0.016 |
✅ 3.000 |
✅ 0.92 |
/open-source |
✅ 2.7s |
✅ 4.8s |
✅ 0.000 |
✅ 0.000 |
✅ 0.78 |
/writing |
✅ 2.7s |
✅ 2.9s |
✅ 0.000 |
✅ 9.000 |
✅ 0.91 |
/writing/custom-formatters-410-20260731 |
✅ 2.9s |
✅ 3.4s |
✅ 0.147 |
✅ 0.000 |
✅ 0.81 |
/writing/decoupling-configuration-config-pages-20220412 |
✅ 2.7s |
✅ 3.0s |
✅ 0.015 |
✅ 0.000 |
✅ 0.90 |
/writing/drupal-site-settings-over-jsonapi-consumer-20260826 |
✅ 2.9s |
✅ 4.1s |
✅ 0.159 |
✅ 0.000 |
✅ 0.75 |
/writing/druxt-drupal-13x-resource-list-yours-20260909 |
✅ 3.2s |
✅ 4.1s |
✅ 0.058 |
✅ 0.000 |
✅ 0.80 |
/writing/field-tokens-200-20260722 |
✅ 2.6s |
✅ 2.8s |
✅ 0.019 |
✅ 0.000 |
✅ 0.92 |
/writing/hello-world-20211126 |
✅ 2.9s |
✅ 3.0s |
✅ 0.142 |
✅ 0.000 |
✅ 0.84 |
/writing/jsonapi-views-120-20260812 |
✅ 2.6s |
✅ 2.8s |
✅ 0.005 |
✅ 0.000 |
✅ 0.92 |
/writing/layout-paragraphs-module-20220301 |
✅ 2.8s |
✅ 2.8s |
✅ 0.055 |
✅ 0.000 |
✅ 0.91 |
Thresholds: FCP ≤ 3.5s, LCP ≤ 5.0s, CLS ≤ 0.25, TBT ≤ 600.000, Perf ≥ 0.75
…l to ^4.3.2 [security]
81967fb to
9a10c76
Compare
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR contains the following updates:
^4.3.1→^4.3.2JS-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 (markdownlint-cli2>js-yaml)
v4.3.2Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.