Uh oh!
There was an error while loading. Please reload this page.
chore(deps): unblock js-cookie 3.0.8 via react-use 17.6.1 - #160
Merged
Conversation
Alert #58 (GHSA-qjx8-664m-686j / CVE-2026-46625, prototype hijack in assign() enabling cookie-attribute injection) affects js-cookie <= 3.0.5 and is fixed only on the 3.x line. The 2.x line ended at 2.2.1 in 2019, so no in-range upgrade existed: react-use 17.6.0 declares js-cookie "^2.2.1", which caps below 3.0.0. react-use 17.6.1 (2026-06-10) widened that to "^3.0.0", and every consumer already declares react-use ^17.2.4 / ^17.3.2, so re-resolving reaches it: react-use 17.6.0 -> 17.6.1 js-cookie 2.2.1 -> 3.0.8 @types/js-cookie 2.2.7 -> 3.0.6 js-cookie 2 -> 3 is a major (default path behaviour, noConflict removal, ESM-first build), so this was verified beyond the usual pipeline: the frontend suite passes in isolation, and the built app bundle contains no `document.cookie` across all 268 emitted files — react-use's useCookie hook is not reachable from our import graph and is tree-shaken away entirely. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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 Dependabot alert #58 — GHSA-qjx8-664m-686j / CVE-2026-46625 (high): per-instance prototype hijack in
assign()enabling cookie-attribute injection.Why a lockfile bump alone couldn't fix it
The advisory affects
js-cookie <= 3.0.5and is patched only on the 3.x line. The 2.x line ended at 2.2.1 in 2019 — there is no patched 2.x. And the range capped below it:So
yarn up -R js-cookiewas a no-op:^2.2.1re-resolves to 2.2.1, already the highest 2.x. Same shape as the undici problem in #153, except the ceiling is a caret major boundary rather than an exact pin.What this does
react-use@17.6.1(2026-06-10) widened its range tojs-cookie: ^3.0.0— you were on 17.6.0, the last release that capped at 2.x, missing it by a single patch. Every consumer already declaresreact-use: ^17.2.4/^17.3.2, both of which accept 17.6.1, so one command reaches it:react-usejs-cookie@types/js-cookieLockfile-only: 13 insertions, 13 deletions, no manifest touched. react-use 17.6.1's other dependencies are unchanged.
Verification
js-cookie2 → 3 is a genuine major (defaultpathbehaviour,noConflictremoval, ESM-first build), so this got more scrutiny than an in-range re-resolution:yarn install --immutableplugin-rwfrontend tests, isolatedyarn typecheck@types/js-cookiemajoryarn buildyarn lintyarn test(full)yarn format:checkyarn workspace app buildThe bundle check
Checked whether js-cookie reaches the shipped app at all. It doesn't:
react-use'suseCookiehook isn't reachable from our import graph, so webpack tree-shakes js-cookie away entirely. The vulnerable code was never present in the built app — not merely unexploitable, but absent.Scope
@backstage/core-componentsis a peerDependency/devDependency ofplugins/rw, so js-cookie never shipped inside the published package either; consumers resolvecore-componentsfrom their own tree. The value here is a clean alerts page and a current transitive graph, not a closed hole.🤖 Generated with Claude Code