Skip to content

fix(js): bump js-yaml to >=4.2.0 (GHSA-h67p-54hq-rp68)#2124

Merged
chaliy merged 1 commit into
mainfrom
claude/dependabot-js-yaml
Jun 24, 2026
Merged

fix(js): bump js-yaml to >=4.2.0 (GHSA-h67p-54hq-rp68)#2124
chaliy merged 1 commit into
mainfrom
claude/dependabot-js-yaml

Conversation

@chaliy

@chaliy chaliy commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Security: Dependabot alert #53

GHSA-h67p-54hq-rp68 (medium) — js-yaml ≤ 4.1.1 has a quadratic-complexity DoS in YAML merge-key handling via repeated aliases. Fixed in 4.2.0.

The only vulnerable copy in crates/bashkit-js was js-yaml@3.14.2, pulled transitively by supertap@3.0.1 (via the ava test runner). It is dev/test tooling and only dumps YAML (never parses untrusted input), so it isn't exploitable here — but the alert flags by version range, so this clears it with a real upgrade rather than a dismissal.

Change

  • pnpm override js-yaml: >=4.2.0 — collapses the tree to a single js-yaml@4.2.0.
  • supertap@3.0.1 still calls yaml.safeDump, which was removed in js-yaml 4. Patched via pnpm.patchedDependencies to use yaml.dump (safe by default in v4, identical signature for this call). Patch file: patches/supertap@3.0.1.patch.

Verification

  • pnpm install --frozen-lockfile is consistent (the gate JS CI uses).
  • Confirmed js-yaml@3.14.2 is gone; only 4.2.0 remains; all supertap dependents resolve to the patched variant.
  • Smoke-tested supertap's TAP error-diagnostic path under js-yaml 4.2.0 — it emits a valid --- … ... YAML block and finish() works.

Generated by Claude Code

Dependabot alert #53 (medium): js-yaml <= 4.1.1 has a quadratic-complexity
DoS in YAML merge-key handling via repeated aliases. The only consumer in
the JS package tree was supertap@3.0.1 (transitive via ava), which pulled
js-yaml 3.14.2.

Force js-yaml >=4.2.0 via a pnpm override. supertap@3.0.1 still calls the
v3-only `yaml.safeDump`, removed in v4, so it is patched (via
pnpm patchedDependencies) to use `yaml.dump`, which is safe by default in
v4 and has the same signature for this usage. Verified supertap's TAP
error-diagnostic path still emits a valid YAML block under js-yaml 4.2.0,
and `pnpm install --frozen-lockfile` is consistent.
@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 Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 520a13a Commit Preview URL

Branch Preview URL
Jun 24 2026, 09:23 AM

@chaliy chaliy merged commit 4c9efba into main Jun 24, 2026
26 checks passed
@chaliy chaliy deleted the claude/dependabot-js-yaml branch June 24, 2026 09:34
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.

1 participant