Skip to content

fix(deps): resolve js-yaml CVE-2025-27714 via pnpm overrides - #3607

Merged
cixzhang merged 1 commit into
mainfrom
navi/chore/dependency-night-watch-20260705
Jul 8, 2026
Merged

cixzhang merged 1 commit into
mainfrom
navi/chore/dependency-night-watch-20260705

Conversation

@cixzhang

@cixzhang cixzhang commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Resolves Dependabot alerts #102 and #103 for js-yaml quadratic-complexity DoS (CVE-2025-27714).

Changes:

  • read-yaml-file>js-yaml: ^3.15.0 -- keeps the 3.x consumer on a patched 3.x release (read-yaml-file depends on the 3.x safeLoad API)
  • @changesets/parse>js-yaml: >=4.2.0 -- bumps the 4.x consumer past the vulnerable range

Both are transitive dependencies of @changesets/cli. Verified with pnpm build and pnpm test --run (306 files, 5582 tests passing).

Not addressed here:

Night Watch -- Dependencies

Add pnpm overrides to fix two Dependabot alerts for js-yaml:
- read-yaml-file>js-yaml: ^3.15.0 (patches quadratic DoS in 3.x line)
- @changesets/parse>js-yaml: >=4.2.0 (patches quadratic DoS in 4.x line)

Both are transitive deps of @changesets/cli. The overrides keep each
consumer on an API-compatible major line (3.x uses safeLoad, 4.x+ uses
load with schema argument).
@vercel

vercel Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 5, 2026 1:50pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 5, 2026
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Jul 5, 2026
@josephfarina

Copy link
Copy Markdown
Contributor

Heads up: the @changesets/parse>js-yaml override jumps that transitive dep from 4.1.1 to 5.2.1 — a major version bump, not just the CVE patch. CI's green so it resolves fine at build time, but js-yaml 5.x has API changes (e.g. safeLoad removal) so worth a quick sanity check that changesets' own usage still works before we merge.

@cixzhang
cixzhang marked this pull request as ready for review July 8, 2026 04:23
@cixzhang
cixzhang merged commit ac62d58 into main Jul 8, 2026
16 checks passed
@cixzhang cixzhang added the deps label Jul 8, 2026
@github-actions
github-actions Bot deleted the navi/chore/dependency-night-watch-20260705 branch July 12, 2026 06:58
cixzhang pushed a commit that referenced this pull request Jul 25, 2026
…#3221) (#3889)

`@changesets/cli` -> `@manypkg/get-packages` -> `read-yaml-file` was still
resolving js-yaml 3.15.0, below the 4.2.0 that patches CVE-2026-53550. The
override added in #3607 fixed a different js-yaml advisory and deliberately
held this chain on the 3.x line, because read-yaml-file 1.x calls `safeLoad`,
which 4.x renamed to `load` — so overriding js-yaml alone throws
`TypeError: yaml.safeLoad is not a function`.

Lift the package rather than patch it. read-yaml-file 2.x calls `load` and
depends on js-yaml ^4, so the pin is no longer needed. Its only consumer is
@manypkg/get-packages, and 2.x keeps the same CJS surface (default export,
`.default`, and `.sync`), so nothing at the call site changes. This also avoids
introducing `pnpm patch` machinery — which the issue proposed, but which the
repo does not use and which would touch every install and the release pipeline.

The js-yaml floor is `^4.2.0`, not `>=4.2.0`: the looser range resolves to
js-yaml 5.x, outside the `^4` range read-yaml-file 2.x declares.

Net effect on the tree: js-yaml 3.15.0, read-yaml-file 1.1.0, argparse 1.0.10
and sprintf-js 1.0.3 leave; js-yaml 4.3.0, read-yaml-file 2.1.0 and
strip-bom 4.0.0 arrive. No package.json changes, no new direct dependency, and
the chain is dev-side (release tooling) — nothing ships in core's runtime deps.

Claude-Session: https://claude.ai/code/session_01VYm8FsvUjk3xwDmonZRYeE

This branch was successfully deployed

1 active deployment
Preview — 02dcd8a4 Deployed Jul 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants