Skip to content

chore(deps): bump brace-expansion to 1.1.18 in yarn.lock (CVE-2026-69152) - #211

Merged
styfle merged 2 commits into
vercel:mainfrom
anupamme:fix-repo-webpack-asset-relocator-loader-cve-2026-69152-brace-expansion
Aug 7, 2026
Merged

chore(deps): bump brace-expansion to 1.1.18 in yarn.lock (CVE-2026-69152)#211
styfle merged 2 commits into
vercel:mainfrom
anupamme:fix-repo-webpack-asset-relocator-loader-cve-2026-69152-brace-expansion

Conversation

@anupamme

@anupamme anupamme commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-resolve brace-expansion@^1.1.7 from 1.1.11 to 1.1.18 in yarn.lock to clear
CVE-2026-69152 (unbounded intermediate arrays / DoS). Lockfile-only, 3 lines.

Why no manifest change

1.1.18 is the maintenance-v1 fix and is already inside the declared ^1.1.7 range,
so no package.json or resolutions edit is needed. A plain yarn install will not
pick it up either — yarn v1 keeps any existing lockfile entry that still satisfies its
range — so the entry was dropped and re-resolved to force the bump.

The only other range in the tree, brace-expansion@^5.0.8, was already at 5.0.9.
Those are the two entries in the lockfile, and both are now at or above the fixed
versions for this advisory.

Dropped from this PR

This PR originally upgraded glob v7 → v10 and jest v26 → v29. Both were reverted.

They did not clear the advisory. jest still depends on glob v7 (@jest/reporters,
jest-config, jest-runtime) and test-exclude on glob@^7.1.6, so
minimatch@3 → brace-expansion@^1.1.7 stays in the tree either way. Re-resolving that
range is what actually fixes it.

The glob bump silently broke asset emission. glob v7 matched ignore patterns
against the returned paths, and every call site here passes an absolute pattern, so the
relative pattern node_modules/**/* never matched — the option was a no-op. glob v9+
matches ignore relative to cwd, so for a build whose dependencies live in
./node_modules (the normal case) it matches everything under it. All three call sites
— the two globSync calls in asset-relocator.js and the shared-library glob in
sharedlib-emit.js — returned nothing:

cwd     = test/project-chunking
pattern = <cwd>/node_modules/@img/sharp-linux-x64/**/*
glob  7 + ignore -> 5 matches
glob 10 + ignore -> 0 matches

yarn test failed on should correctly run webpack build project-chunking: sharp's
native binaries were no longer emitted, so chunks/sharp-chunk.js lost its
ab+"sharp-linux-x64/lib/..." reference and dist/assets/ lost build, vendor and
sharp-{,libvips-}linux{,musl}-x64. webpack still reported zero errors, so this broke
at runtime rather than at build time.

glob is a runtime dependencies entry of a package consumed by ncc, so a major bump
is breaking for downstream consumers and belongs in its own PR — one targeting v13
(v10 is itself deprecated on npm) with Windows coverage, since v9+ also changed
backslash escaping and result separators.

Not covered here

npm (pulled in by semantic-release v25 → @semantic-release/npm v13) vendors
brace-expansion 5.0.7 as a bundled dependency. Bundled deps do not appear in
yarn.lock, so lockfile scanners will not flag it and it cannot be overridden from
here. It clears when npm ships a release bundling 5.0.9.

Verification

On Node 22: yarn test 85/85 passing, yarn test-coverage meeting thresholds,
yarn install --frozen-lockfile clean from scratch, and test/project-chunking
emitting the same asset set as main.


Original vulnerability report and first commit by
OrbisAI Security.

Co-authored-by: Anupam Mediratta mediratta@gmail.com

@anupamme
anupamme requested review from Timer and styfle as code owners August 6, 2026 15:30
Comment thread package.json Outdated
@styfle

styfle commented Aug 6, 2026

Copy link
Copy Markdown
Member

Present in dependency tree, not confirmed reachable

Lets use AI to confirm if its reachable, otherwise we can close, right?

@anupamme

anupamme commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

The vulnerability is not reachable. All glob patterns in this codebase are constructed from hardcoded extglob strings (@(js|json|node), @(dylib|so?(.*)) and resolved filesystem paths; none contain brace expansion syntax ({}), and there's no path for untrusted input to reach brace expansion's parser.

It is recommended to keep as a defence-in-depth practice; however, it is safe to close as well.

@styfle
styfle enabled auto-merge (squash) August 7, 2026 02:26
@styfle
styfle force-pushed the fix-repo-webpack-asset-relocator-loader-cve-2026-69152-brace-expansion branch from e5e94af to c3bea61 Compare August 7, 2026 02:32
@styfle styfle changed the title fix: upgrade brace-expansion to 1.1.18, 2.1.4, 3.0.6, 5.0.9 (CVE-2026-69152) fix: bump brace-expansion to 1.1.18 in yarn.lock (CVE-2026-69152) Aug 7, 2026
@styfle
styfle disabled auto-merge August 7, 2026 13:21
`minimatch@^3.0.4 -> brace-expansion@^1.1.7` was pinned at 1.1.11 in the
lockfile. 1.1.18 is the maintenance-v1 fix for the unbounded intermediate
array DoS and is already inside the declared `^1.1.7` range, so no
manifest or `resolutions` change is needed -- the entry just had to be
re-resolved.

A plain `yarn install` does not do this: yarn v1 keeps any existing
lockfile entry that still satisfies its range. The entry was dropped and
re-resolved to force the bump.

The other range in the tree, `brace-expansion@^5.0.8`, was already at
5.0.9. Those are the only two brace-expansion entries in the lockfile,
and both are now at or above the fixed versions for this advisory.

This supersedes the original glob v7 -> v10 + jest v26 -> v29 upgrade,
which was both unnecessary and a silent regression.

Unnecessary: jest still depends on glob v7 (@jest/reporters, jest-config,
jest-runtime) and test-exclude on glob@^7.1.6, so
minimatch@3 -> brace-expansion@^1.1.7 stays in the tree either way.
Re-resolving that range is what actually clears the advisory.

Regression: glob v7 matched `ignore` patterns against the returned paths,
and every call site here passes an absolute pattern, so the relative
pattern `node_modules/**/*` never matched -- the option was a no-op.
glob v9+ matches `ignore` relative to cwd, so for a build whose
dependencies live in ./node_modules (the normal case) it now matches
everything under it. All three call sites -- the two globSync calls in
asset-relocator.js and the shared library glob in sharedlib-emit.js --
returned nothing:

    cwd     = test/project-chunking
    pattern = <cwd>/node_modules/@img/sharp-linux-x64/**/*
    glob  7 + ignore -> 5 matches
    glob 10 + ignore -> 0 matches

`yarn test` failed on `should correctly run webpack build
project-chunking`: sharp's native binaries were no longer emitted, so
chunks/sharp-chunk.js lost its ab+"sharp-linux-x64/lib/..." reference and
dist/assets/ lost build, vendor and sharp-{,libvips-}linux{,musl}-x64.
webpack still reported zero errors, so it broke at runtime rather than at
build time.

glob is a runtime `dependencies` entry of a package consumed by ncc, so a
major bump is breaking for downstream and belongs in its own PR -- one
targeting v13 (v10 is itself deprecated on npm) with Windows coverage,
since v9+ also changed backslash escaping and result separators.

Not covered here: npm (pulled in by semantic-release v25 ->
@semantic-release/npm v13) vendors brace-expansion 5.0.7 as a bundled
dependency. Bundled deps do not appear in yarn.lock, so lockfile scanners
will not flag it and it cannot be overridden from here.

Verified on Node 22: `yarn test` 85/85, `yarn test-coverage` meeting
thresholds, `yarn install --frozen-lockfile` clean from scratch, and
test/project-chunking emitting the same asset set as main.

Co-authored-by: Anupam Mediratta <mediratta@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@styfle
styfle force-pushed the fix-repo-webpack-asset-relocator-loader-cve-2026-69152-brace-expansion branch from c3bea61 to e7f39b8 Compare August 7, 2026 13:25
@styfle styfle changed the title fix: bump brace-expansion to 1.1.18 in yarn.lock (CVE-2026-69152) chore(deps): bump brace-expansion to 1.1.18 in yarn.lock (CVE-2026-69152) Aug 7, 2026
@styfle
styfle enabled auto-merge (squash) August 7, 2026 13:46
@styfle
styfle merged commit a72eacf into vercel:main Aug 7, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.10.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants