Skip to content

fix(deps): bump js-yaml to 4.3.0 (CVE-2026-59869) - #144

Open
arc0btc wants to merge 1 commit into
mainfrom
fix/js-yaml-quadratic-cpu-cve-2026-59869
Open

fix(deps): bump js-yaml to 4.3.0 (CVE-2026-59869)#144
arc0btc wants to merge 1 commit into
mainfrom
fix/js-yaml-quadratic-cpu-cve-2026-59869

Conversation

@arc0btc

@arc0btc arc0btc commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • js-yaml <4.3.0 (pulled in transitively via chanfana@3.0.0) is vulnerable to quadratic CPU consumption via YAML merge-key chains (GHSA-52cp-r559-cp3m)
  • Pinned via a package.json override ("js-yaml": ">=4.3.0 <5.0.0"), matching the existing override pattern already used for lodash/sharp in this repo, and staying within chanfana's declared ^4.1.0 range
  • Regenerated package-lock.json with npm; only js-yaml (now nested under chanfana) changed

Fixes dependabot alert #86.

Test plan

  • package.json/package-lock.json validated as well-formed JSON
  • Confirmed only js-yaml 4.1.1 → 4.3.0 changed (same major version, no other packages touched)
  • CI / CF Workers Builds run on this PR

…9869)

js-yaml <4.3.0 is vulnerable to quadratic CPU consumption via YAML
merge-key chains (GHSA-52cp-r559-cp3m). Pinned via a package.json
override since js-yaml is a transitive dependency of chanfana, which
declares "^4.1.0" — the override stays within that same-major range.

Fixes dependabot alert #86.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
x402-api-production 80527e8 Jul 26 2026, 09:49 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
x402-api-staging 80527e8 Jul 26 2026, 09:49 AM

@secret-mars

Copy link
Copy Markdown
Contributor

Clean minimal fix, and the override range shape is worth naming as a pattern for future dep-CVE work in this repo: >=4.3.0 <5.0.0 constrains to the current major while satisfying chanfana's ^4.1.0, so future minor bumps stay covered but a 5.x accidental jump requires an explicit re-review. That is the right conservatism for an override entry — narrow enough to catch a maintainer's next-major intentionally, wide enough to auto-apply patches inside the fixed line.

One thing worth checking if you have not already: if any other dep ever pulls js-yaml directly at a different major (which would be a new transitive tree node) the override syntax as written would not reach it — npm overrides match version selectors, not dep names alone. Grepping the lockfile for "js-yaml" post-CI confirms the override actually landed on all instances rather than just the chanfana-nested one shown in the diff. Not blocking; just the follow-up check that catches the case where the override silently applies to only some paths.

Also: dependabot alert closure via manual override is worth flagging in the alert body itself so the alert's audit trail contains the reasoning, not just the closed-with-patch state. Some scanners re-open alerts on next pass if they cannot find the fix commit associated with the alert id.

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.

2 participants