Repository navigation
fix(deps): lift read-yaml-file to 2.x to clear js-yaml CVE-2026-53550 (#3221) - #3889
Merged
Merged
Conversation
…meta#3221) `@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 meta#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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis ReportNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | View full report |
AKnassa
marked this pull request as ready for review
July 13, 2026 01:18
cixzhang
approved these changes
Jul 25, 2026
cixzhang
left a comment
Contributor
There was a problem hiding this comment.
Legitimate security fix. @changesets/cli → @manypkg/get-packages → [email protected] pins [email protected], which is below the 4.2.0 that patches CVE-2026-53550 (algorithmic-complexity DoS in merge-key << processing). Overriding js-yaml alone breaks read-yaml-file 1.x (4.x renamed safeLoad→load), so lifting read-yaml-file to 2.x — which calls load and depends on js-yaml ^4 — is the correct remediation. Dev-toolchain/lockfile only, CI green. LGTM.
cixzhang
pushed a commit
that referenced
this pull request
Jul 28, 2026
next pulls sharp as an optional dependency for image optimization and
resolves 0.34.5, which inherits four libvips advisories: CVE-2026-33327,
CVE-2026-33328, CVE-2026-35590 and CVE-2026-35591.
They are patched in sharp 0.35.0, a semver-major bump on the 0.x line, so
next's own `^0.34` range can never reach it — hence an override rather than a
lockfile refresh. Both next entries in the tree (15.5.20 and
16.3.0-preview.5) resolve through it, and the platform packages move with
it: `@img/sharp-libvips-*` goes 1.2.4 to 1.3.2, which is where the actual
fix lives.
sharp is already in `allowBuilds`, so the native postinstall is unchanged.
0.35.3 published 2026-07-01, well clear of the repo's 7-day
`minimumReleaseAge`.
The override is temporary by construction — the comment says to drop it once
next depends on 0.35 itself.
Verified beyond the lockfile, since the concern with this bump is the native
binary and next's image pipeline rather than the resolution:
- sharp 0.35.3 loads and reports libvips 8.18.3
- it round-trips a real encode (create -> .png() -> Buffer)
- `pnpm build` (core, lab, charts, vega, 7 themes) succeeds
- `pnpm -F @astryxdesign/docsite build` succeeds — a full next build with
prerendering, which is where image optimization would surface
- `pnpm test`: 384 files, 7871 tests, all pass
No changeset: this touches no published package's source, matching #3889 and
#4398, which were both lockfile + pnpm-workspace.yaml only.
Fixes #4400
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3221.
The problem
@changesets/cli→@manypkg/get-packages→read-yaml-filestill resolves 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 (
read-yaml-file>js-yaml: ^3.15.0). That was the right call at the time:read-yaml-file1.x callssafeLoad, which js-yaml 4.x renamed toload, so overriding js-yaml alone throwsTypeError: yaml.safeLoad is not a function. The pin is exactly what this issue needs removed.The fix: lift the package, don't patch it
read-yaml-file2.x callsloadand depends onjs-yaml ^4— so the pin becomes unnecessary rather than needing a workaround.This deliberately avoids the
pnpm patchroute the issue proposed. That would introducepatchedDependencies+ apatches/dir the repo doesn't use, affecting every install and the release pipeline — a toolchain policy call. Overriding is the mechanism this repo already uses, and #3607's own rationale ("keep each consumer on an API-compatible major line") reads as a preference against patching.Two details worth flagging for review:
read-yaml-file2.x is a drop-in. Its only consumer is@manypkg/get-packages, and 2.x keeps the same CJS surface — default export,.default, and.sync.^4.2.0, not>=4.2.0. The looser range resolves to js-yaml 5.x, outside the^4rangeread-yaml-file2.x declares. I hit this while testing.Dependency delta
No
package.jsonchanges, no new direct dependency. Four packages leave, three arrive — the tree gets one smaller:[email protected](the vulnerable one),[email protected],[email protected],[email protected][email protected](patched),[email protected],[email protected]The chain is dev-side (release tooling) — nothing here ships in
@astryxdesign/core's runtime dependencies.Test plan
node_modules/js-yamlis now4.3.0(was3.15.0);@changesets/parse's nested copy stays5.2.0. Both above the patch floor.read-yaml-fileworks at runtime —.sync()parsespnpm-workspace.yamlcorrectly, with js-yaml 4.3.0 underneath.typeof default === 'function',typeof .sync === 'function'.changeset statusexits 0 and correctly lists the packages to be bumped;changeset version --snapshotcompletes. This is the code path that actually consumesread-yaml-file, so it's the check that matters.pnpm exec vitest run— 336 files, 6298 tests, all passing.pnpm check:repo— all five gates pass.No changeset: this changes no published package's code, matching #3607, which shipped none for the same class of change.