Skip to content

chore(deps): force tar >=7.5.21 and shell-quote >=1.9.0 to clear CVEs - #424

Merged
abbaseya merged 1 commit into
mainfrom
chore/security-tar-shell-quote-cve-fix
Jul 27, 2026
Merged

chore(deps): force tar >=7.5.21 and shell-quote >=1.9.0 to clear CVEs#424
abbaseya merged 1 commit into
mainfrom
chore/security-tar-shell-quote-cve-fix

Conversation

@JosephSamirL

@JosephSamirL JosephSamirL commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

Clears three reported dependency vulnerabilities in yarn.lock by forcing two entries in the root resolutions block, following the pattern already established there for security force-bumps (form-data, pbkdf2, elliptic, braces, nth-check, …). 2 files, 2 added resolutions.

  • package.json — adds "tar": ">=7.5.21" and "shell-quote": ">=1.9.0".
  • yarn.locktar 6.2.1 → 7.5.21, shell-quote 1.8.1 → 1.10.0, plus tar 7's transitive deps (@isaacs/fs-minipass, chownr@3, minipass@7, minizlib@3, yallist@5) replacing tar 6's.
     "http-proxy-middleware": ">=2.0.9",
-    "nth-check": ">=2.0.1"
+    "nth-check": ">=2.0.1",
+    "tar": ">=7.5.21",
+    "shell-quote": ">=1.9.0"
   }

Why

Three advisories, all denial-of-service — an attacker-supplied archive or command string that costs the process orders of magnitude more CPU/memory than its size implies, stalling or exhausting the host:

Severity Advisory Package Vulnerable First patched Attack
CRITICAL CVE-2026-59873 tar <= 7.5.18 7.5.19 decompression / parse DoS
HIGH CVE-2026-59874 tar <= 7.5.17 7.5.18 infinite loop on negative entry size
HIGH CVE-2026-13311 shell-quote <= 1.8.4 1.9.0 quadratic complexity in parse()

We were on tar@6.2.1 (via ^6.1.11 / ^6.1.2) and shell-quote@1.8.1 (via ^1.4.2 / ^1.6.1 / ^1.7.3 / ^1.8.1). There is no patched tar 6.x — the vulnerable range covers all of 6.x — so this is a forced 6 → 7 major bump.

The floor is 7.5.21, not 7.5.19

A fourth advisory found while checking the above, GHSA-r292-9mhp-454m (MODERATE, published 2026-07-24), covers tar <= 7.5.20 and is first patched in 7.5.21. A >=7.5.19 floor satisfying only the three reported CVEs would still have permitted a vulnerable version, so the floor is set past all four.

Why 7.5.21 and not the latest 7.5.22

Yarn resolved 7.5.21 rather than 7.5.22 (published 2026-07-24) because the lockfile was generated under the 3-day npmMinimalAgeGate from #421 — our own supply-chain gate held back the fresher release, exactly as intended. 7.5.21 clears all four advisories, so the gate cost nothing here. The >= floor means future installs float upward on their own without another PR, once 7.5.22 ages past the window.

Safety — no behavior change

Both packages are dev-toolchain-only transitives. Neither appears in any published package's runtime dependencies, so nothing ships to consumers:

  • tarcacache@17/@18, node-gyp
  • shell-quotebrowserify@17 (×2), launch-editor, outpipe, react-dev-utils

cacache and node-gyp pin tar@^6, so the forced major needed a real smoke test rather than an assumption. Everything is green:

Command Result
yarn install exit 0 — no peer or engine conflict from the 6 → 7 bump
yarn build exit 0 — all 13 packages
yarn test exit 0 — 546 passing, 0 failing
packages/js-sdkyarn lint exit 0
yarn install --immutable exit 0 — lockfile stable, no drift

The lockfile was additionally checked against a config without the age gate, which resolved identically — so the 7.5.21 pin is stable on its own merits, not an artifact of the gate holding back 7.5.22.

Verification evidence

Exactly one descriptor each, no vulnerable version anywhere in the lockfile:

$ grep -nE '^"?(tar|shell-quote)@' yarn.lock
26653:"shell-quote@npm:>=1.9.0":
27851:"tar@npm:>=7.5.21":

$ grep -nE 'resolution: "(tar|shell-quote)@' yarn.lock
26655:  resolution: "shell-quote@npm:1.10.0"
27853:  resolution: "tar@npm:7.5.21"

Installed on disk: tar 7.5.21, shell-quote 1.10.0. Lockfile diff is tightly scoped at 51 insertions / 36 deletions — only the two packages and their transitives.

Notes for reviewers

  • Root yarn lint (which chains all 13 packages) reports 1674 prettier errors in packages/types/src/config/{index,types.gen}.ts. Those are pre-existing and auto-generated — byte-identical to main, and this PR touches no source. CI lints only packages/js-sdk, which passes.
  • yarn build has a side-effect of rewriting peer-dep ranges in 11 workspace package.json files. Reverted here — that is a separate concern with its own chore(deps): sync workspace peer dep ranges commit. Only root package.json and yarn.lock are staged.
  • yarn test:browser was not run locally (needs Playwright browsers plus the CONVERT_STAGING_SDK_KEY* secrets); it runs in the pass-qa job.
  • This addresses only these three CVEs. The repo has a large open Dependabot backlog that warrants a separate sweep.

🤖 Generated with Claude Code

Adds two entries to the root `resolutions` block, matching the existing
pattern used for security force-bumps.

tar was pinned at 6.2.1 (via ^6.1.11 / ^6.1.2 from cacache and node-gyp)
and shell-quote at 1.8.1 (via browserify, launch-editor, outpipe and
react-dev-utils). Both are dev-time tooling only — neither appears in any
published package's runtime dependencies.

Resolves:
  - CVE-2026-59873 / GHSA-23hp-3jrh-7fpw  CRITICAL  tar          <= 7.5.18
  - CVE-2026-59874 / GHSA-8x88-c5mf-7j5w  HIGH      tar          <= 7.5.17
  - CVE-2026-13311 / GHSA-395f-4hp3-45gv  HIGH      shell-quote  <= 1.8.4

There is no patched tar 6.x — the vulnerable range covers all of 6.x, so
this is a forced 6 -> 7 major bump.

The floor is >=7.5.21 rather than 7.5.19 because GHSA-r292-9mhp-454m
(published 2026-07-24, vulnerable <= 7.5.20) is first patched in 7.5.21.
Yarn resolves tar 7.5.21 rather than the newer 7.5.22, which is still
inside the repo's npmMinimalAgeGate window; 7.5.21 clears all advisories.

Verified: yarn build, yarn test (546 passing / 0 failing),
packages/js-sdk lint, and yarn install --immutable all pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@JosephSamirL
JosephSamirL force-pushed the chore/security-tar-shell-quote-cve-fix branch from e326414 to a0815a2 Compare July 27, 2026 15:29
@JosephSamirL
JosephSamirL changed the base branch from main to main-convert July 27, 2026 15:30
@JosephSamirL
JosephSamirL force-pushed the chore/security-tar-shell-quote-cve-fix branch from a0815a2 to e326414 Compare July 27, 2026 15:51
@JosephSamirL
JosephSamirL changed the base branch from main-convert to main July 27, 2026 15:51
@sonarqubecloud

Copy link
Copy Markdown

@JosephSamirL
JosephSamirL requested a review from abbaseya July 27, 2026 15:54
@JosephSamirL JosephSamirL self-assigned this Jul 27, 2026

@abbaseya abbaseya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Reviewed at e326414 and re-derived the claims rather than taking the body at face value. Everything checks out:

  • All four advisories confirmed against live GitHub advisory data, patched versions match. A full affects=tar sweep found no advisory affecting 7.5.21, and confirmed no 6.x patched release exists anywhere in the cluster — so the forced 6 → 7 major really is unavoidable.
  • Zero runtime blast radius. Neither package is in any of the 13 published packages' runtime deps.
  • The major bump is safer than the writeup suggests: cacache 17 and 18 declare tar but never require() it, so node-gyp is the only real consumer. Its option set (file, strip, filter, onwarn, cwd) is still fully declared in tar 7.5.21, and it only fires for optional macOS-only native builds. Node floor >=18 is met by the Node 22 CI matrix.
  • The #421 age gate was respected, not bypassed — 7.5.22 was 0.03 days short of the 3-day window, and 7.5.21 clears everything anyway.

Two small notes, neither blocking:

  1. The sweep also clears two further medium tar advisories in the same July cluster (GHSA-w8wr-v893-vjvp, GHSA-gvwx-54wh-qm9j). The fix is complete; the writeup is just under-inclusive.
  2. "Checked without the age gate, resolved identically → the pin is stable on its own merits" doesn't quite follow — Yarn won't re-resolve a descriptor an existing lockfile already satisfies, so that measures lockfile stickiness rather than gate-independence. The actual reason (the gate bit by 0.03 days, and 7.5.21 clears all four) is the stronger one and needs no help.

One thing worth knowing for future triage: next vendors its own copies of both packages under dist/compiled/, with no version field. No resolutions entry can reach those and no scanner flags them. Out of scope here, but it means "no vulnerable tar in the lockfile" isn't quite the same as "no vulnerable tar on disk".

@abbaseya
abbaseya merged commit 565b1d5 into main Jul 27, 2026
7 checks passed
@abbaseya
abbaseya deleted the chore/security-tar-shell-quote-cve-fix branch July 27, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants