You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
google-gax declares rimraf under dependencies, but rimraf does not appear
to be used by any shipped runtime code. Because rimraf@5 transitively depends
on glob@10 → minimatch@9 → brace-expansion@2, every consumer of google-gax
currently inherits GHSA-mh99-v99m-4gvg (brace-expansion, DoS via
unbounded expansion) in their production dependency tree.
If the declaration is indeed build-only or vestigial, moving it to devDependencies (or removing it) would clear the advisory for all downstream
consumers without any code change.
Version
google-gax@5.0.8 (current latest at time of writing).
brace-expansion@5.0.8's CommonJS build sets __esModule: true and exports only
a named expand, so __importDefault does not wrap it and brace_expansion_1.default is undefined. Every brace-pattern match then throws TypeError: ... is not a function. (minimatch@10 bumped its major precisely
for this export-shape change.) Note that brace-expansion's advisory range is <=5.0.7, i.e. every 1.x/2.x/4.x backport is affected — 5.0.8 is the only
patched release, and minimatch@9 cannot consume it.
Consumers are therefore left with a scoped override such as:
which is safe only because nothing in google-gax actually calls rimraf — but
it is a workaround that every downstream project has to discover and justify
independently.
Requested outcome
Whichever is correct for the package:
Move rimraf to devDependencies (or drop it) if it is build-only/unused; or
If it genuinely is required at runtime, bump the declared range to rimraf@^6,
which resolves glob@13 → minimatch@10 → brace-expansion@^5.
Related
Update gaxios to 7.2.0 in gcp-metadata #8868 — gcp-metadata pins gaxios to an exact version; gaxios@7.1.3
carries the same rimraf: ^5.0.1 declaration (also unused in its shipped build/), reaching the tree through google-auth-library → gcp-metadata. gaxios@7.3.0 dropped rimraf outright.
Environment
Node.js 22
npm 10
Reproducible from a clean install of @google-cloud/firestore@8.7.0 alone.
Summary
google-gaxdeclaresrimrafunderdependencies, butrimrafdoes not appearto be used by any shipped runtime code. Because
rimraf@5transitively dependson
glob@10 → minimatch@9 → brace-expansion@2, every consumer ofgoogle-gaxcurrently inherits GHSA-mh99-v99m-4gvg (
brace-expansion, DoS viaunbounded expansion) in their production dependency tree.
If the declaration is indeed build-only or vestigial, moving it to
devDependencies(or removing it) would clear the advisory for all downstreamconsumers without any code change.
Version
google-gax@5.0.8(current latest at time of writing).Dependency path
The same tail is reachable via
@google-cloud/pubsuband@google-cloud/tasks,which also depend on
google-gax.Evidence that
rimrafis not used at runtimeAgainst the published tarball / installed package for
google-gax@5.0.8:So the package neither imports
rimrafin its shipped output nor invokes itfrom a lifecycle/utility script.
Why consumers cannot easily work around this
The obvious downstream mitigation — overriding
brace-expansionto the patched5.0.8— breaksgoogle-gaxat runtime.minimatch@9.0.9compiles to:brace-expansion@5.0.8's CommonJS build sets__esModule: trueand exports onlya named
expand, so__importDefaultdoes not wrap it andbrace_expansion_1.defaultisundefined. Every brace-pattern match then throwsTypeError: ... is not a function. (minimatch@10bumped its major preciselyfor this export-shape change.) Note that
brace-expansion's advisory range is<=5.0.7, i.e. every 1.x/2.x/4.x backport is affected —5.0.8is the onlypatched release, and
minimatch@9cannot consume it.Consumers are therefore left with a scoped override such as:
which is safe only because nothing in
google-gaxactually callsrimraf— butit is a workaround that every downstream project has to discover and justify
independently.
Requested outcome
Whichever is correct for the package:
rimraftodevDependencies(or drop it) if it is build-only/unused; orrimraf@^6,which resolves
glob@13 → minimatch@10 → brace-expansion@^5.Related
gcp-metadatapinsgaxiosto an exact version;gaxios@7.1.3carries the same
rimraf: ^5.0.1declaration (also unused in its shippedbuild/), reaching the tree throughgoogle-auth-library → gcp-metadata.gaxios@7.3.0droppedrimrafoutright.Environment
@google-cloud/firestore@8.7.0alone.