Skip to content

chore: bump js-yaml to fix high Dependabot alert #79 (GHSA-5p4m-2wfm-xmqj) - #168

Merged
ashwini-raja merged 1 commit into
mainfrom
fix/js-yaml-omap-dos-alert-79
Aug 18, 2026
Merged

ashwini-raja merged 1 commit into
mainfrom
fix/js-yaml-omap-dos-alert-79

Conversation

@ashwini-raja

Copy link
Copy Markdown
Contributor

Summary

Fixes Dependabot alert #79 — a high-severity (CVSS 7.5, CWE-407) denial-of-service in js-yaml's !!omap resolution, which is O(n²) in the number of entries and can stall the Node event loop on a small untrusted YAML input.

js-yaml is a transitive, dev-only dependency here (via eslint/mocha and nyc). Two vulnerable versions were resolved in yarn.lock:

Package Old New Pulled in via
js-yaml (4.x) 4.3.0 4.3.1 eslint, mocha
js-yaml (3.x) 3.15.0 3.15.1 nyc → @istanbuljs/load-nyc-config

Both patched releases satisfy the existing semver ranges (^4.1.0, ^3.13.1), so this is a lockfile-only change — no package.json edits.

Note: PR #163 previously bumped js-yaml for an earlier alert but landed on 3.15.0 / 4.3.0; this newer advisory (published 2026-08-06) is fixed only in 3.15.1 / 4.3.1.

What Changed

  • yarn.lock: js-yaml 4.3.0 → 4.3.1 and 3.15.0 → 3.15.1 (version, resolved URL, integrity).

Testing

Ran the advisory's proof-of-concept against the installed patched versions:

  • js-yaml 4.3.1: n=80000 !!omap load dropped from ~2600ms (reported for 4.3.0) to 80ms; timings now grow linearly (26 / 26 / 39 / 80 ms as n doubles) rather than quadratically.
  • js-yaml 3.15.1: n=80000 load in 90ms.
  • Duplicate-key rejection semantics preserved (YAMLException still thrown on duplicate omap keys).
  • yarn install accepts the lockfile with no collateral changes.

Checklist

  • I've manually tested the functionality in this PR
  • This pull request is ready for review

Bumps transitive dev dependency js-yaml to patched releases:
- 4.3.0 -> 4.3.1 (via eslint/mocha)
- 3.15.0 -> 3.15.1 (via nyc/@istanbuljs/load-nyc-config)

Fixes O(n^2) CPU consumption in !!omap resolution (CWE-407, CVSS 7.5).
Both patched versions satisfy the existing semver ranges; lockfile-only
change. Verified: n=80000 !!omap load drops from ~2600ms to ~80ms, and
duplicate-key rejection semantics are preserved.
@ashwini-raja
ashwini-raja requested a review from a team as a code owner August 18, 2026 15:26
@ashwini-raja
ashwini-raja merged commit 511252b into main Aug 18, 2026
13 checks passed
@ashwini-raja
ashwini-raja deleted the fix/js-yaml-omap-dos-alert-79 branch August 18, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants