security: override esbuild to fix server-side request forgery (GHSA-gv7w-rqvm-qjhr)#103
security: override esbuild to fix server-side request forgery (GHSA-gv7w-rqvm-qjhr)#103barretts wants to merge 1 commit into
Conversation
|
Grackle review -- esbuild 0.25.8 -> 0.28.1 override for GHSA-gv7w-rqvm-qjhr VerificationFindingsLOW #1 -- Resolution forces version outside Vite's declared semver range VERIFIED: Vite 7.x declares esbuild@^0.25.0 which in 0.x semver means >=0.25.0 <0.26.0. The yarn resolution forces 0.28.1, which is outside Vite's declared compatibility window. However, esbuild 0.26-0.28 release notes show no API changes affecting Vite's integration surface (transform/build API). This project has no test suite to catch regressions, but esbuild is only used as Vite's internal bundler for dev/build tooling, not runtime code. Risk is low but non-zero. Verified location: LOW #2 -- packageManager field added as unrelated change VERIFIED: package.json:69 adds "packageManager": "yarn@1.22.22". This is a Corepack field that pins the package manager version. While harmless and arguably good practice, it is unrelated to the security fix and could be separated. Not a blocker. Line unverified: the cited snippet does not map to a unique changed line in this PR. What's solid
Priority stack for the authorNo blocking issues. The override-outside-declared-range is inherent to the fix strategy and acceptable given esbuild's dev-only role and the upstream release notes showing no breaking API changes. Recommendation: GO skill-sig: 26cfcbaf · 3pp-skill-sig: ad61853a |
…v7w-rqvm-qjhr) Override esbuild from 0.25.8 to ^0.28.1 via yarn resolutions to fix a high-severity SSRF vulnerability. Vite 7.x declares esbuild@^0.25.0 which caps resolution at <0.26.0; a global resolution forces the patched version. Also adds packageManager: yarn@1.22.22 to package.json to prevent corepack ancestor-walk conflicts in CI environments where a parent directory declares a different package manager. Vulnerabilities fixed: - GHSA-gv7w-rqvm-qjhr (high) -- first patched in esbuild 0.28.1 Skill-Sig: ad61853a
8093c35 to
394222f
Compare
|
Grackle review -- no-CI esbuild override for withdrawn advisory VerificationFindingsHIGH #1 -- Advisory GHSA-gv7w-rqvm-qjhr was withdrawn -- fix is unnecessary VERIFIED: The GitHub Advisory Database withdrew GHSA-gv7w-rqvm-qjhr on 2026-06-17 (two days after this commit). The summary now reads 'Withdrawn Advisory'. The vulnerability was specific to Deno module loading via NPM_CONFIG_REGISTRY -- not applicable to Node/Yarn environments. This override is solving a non-existent problem and introduces risk for no security benefit. Verified location: MEDIUM #2 -- Vite downgraded from 7.3.5 to 7.1.12 as collateral VERIFIED: yarn.lock:6361 shows vite resolved to 7.1.12 instead of the prior 7.3.5. The esbuild resolution forced ^0.28.1 which is incompatible with vite 7.3.5's declared esbuild@^0.27.0 peer, causing yarn to fall back to an older vite that declared esbuild@^0.25.0 (which the resolution satisfies). This is a regression from the prior bump in PR #105 which moved vite to 7.3.5. Verified location: LOW #3 -- esbuild 0.27 -> 0.28 is a breaking-change tier bump in 0.x semver HYPOTHESIS: esbuild follows 0.x semver where minor bumps can be breaking. The jump from 0.27.7 to 0.28.1 may introduce behavioral changes in the build output (CSS handling, tree-shaking, etc). Without a test suite, this cannot be verified locally. Refutation: run Verified location: What's solid
Priority stack for the authorRevert this PR -- the advisory was withdrawn (Deno-only, not applicable here) and the override regresses vite from 7.3.5 to 7.1.12. Recommendation: NO-GO skill-sig: 26cfcbaf · 3pp-skill-sig: ad61853a |
84db7c2c)Summary
Fixes 1 high severity 3PP vulnerability in
esbuild(GHSA-gv7w-rqvm-qjhr).esbuild prior to 0.28.1 is vulnerable to server-side request forgery via crafted import paths in certain configurations.
Production risk: Build-time only:
esbuildis a transitive dependency ofvite, which is a devDependency used only during local development and CI builds. It is not loaded by the production bundle.Strategy: override
Why
esbuild prior to 0.28.1 has a high-severity SSRF vulnerability (GHSA-gv7w-rqvm-qjhr). The package is pulled in transitively via
vite@^7.1.0, a devDependency, so production runtime is unaffected. Vite 7.x declaresesbuild@^0.25.0(capped at<0.26.0), which prevents natural lockfile re-resolution to the patched 0.28.1. A global yarn resolution is the correct strategy because only one major of esbuild exists in the tree (no multi-major collapse risk).Changes
package.json
Added a global resolution entry to
resolutions:Why override?
esbuildis transitive viavite@^7.1.0. Vite's declared range^0.25.0caps resolution at<0.26.0, which cannot admit the fix version 0.28.1. Upgrading vite to 7.3.x widens to^0.27.0(still<0.28.0). The only path is a resolution override. Only one esbuild version exists in the tree, so no multi-major conflict.Added
"packageManager": "yarn@1.22.22"to stop corepack ancestor-walk detection from blocking yarn install in nested directory structures.README.md
3pp-util trace-vuln esbuild.yarn.lock
@esbuild/*).Resolutions and overrides
esbuild^0.28.1vite@^7.1.0(devDependency). Vite declaresesbuild@^0.25.0which caps at<0.26.0. Lockfile froze at 0.25.8 (vulnerable). Global resolution forces the patched version; safe because only one major exists in tree.vitereleases a version whose range declaresesbuild@>=0.28.1. Track upstream: https://github.com/vitejs/vite/releases. Verify with3pp-util trace-vuln esbuild. Reviewer-local:yarn why esbuild.Risk Classification
This vulnerability exists only in build-tool dependencies. Production risk: NONE. Remediation prevents scanner noise and supply-chain exposure during CI.
Vulnerabilities Fixed
How to test
Validation
Validation is a before/after comparison. Pre-existing failures are captured in the baseline and explicitly noted so they are not mistaken for regressions introduced by this PR.
Pre-existing failures (not caused by this PR):
package.jsonwith"packageManager": "pnpm@9.15.9"and refused to run. Adding"packageManager": "yarn@1.22.22"to this project's package.json resolved the issue. This is an incidental repair.Notes
@heroku/react-malibu->vite@^7.1.0->esbuild@^0.25.0packageManagerfield addition is a corepack-standard declaration that aligns the project with its actual toolchain and prevents spurious install failures in nested working directories.skill-sig:
26cfcbaf· grackle-sig:84db7c2c· 3pp-skill-sig:ad61853a· 3pp-skill canonical pipeline · 3pp-grackle babysit