Repository navigation
fix(core): bump sharp to 0.35.5 and update node.js to 22 - #3569
Conversation
sharp < 0.35.5 bundles a librsvg vulnerable to CVE-2026-96889 (GHSA-wq5f-xc86-pv6w), which Next.js 13 loads for Image Optimization (GHSA-2464-fhr4-w9xw). sharp 0.35.5 requires Node.js >= 20.9.0, so the core engines field follows it.
|
Review: aprovado com ressalvas Rodei o PR localmente (worktree limpo). O bump funciona: o lockfile está limpo, o build do core passa, os 155 testes do core passam, e o Pontos antes do merge
Observação sobre a descrição Para a doc de lojas Não coberto |
FastStore WebOps builds v3 stores on Node.js 20 or 22, and Next.js 13 predates Node.js 24. CI_NODE_VERSION keeps the Turbo cache separate per Node.js version.
01de260 to
d6ffa7b
Compare
@faststore/api
@faststore/cli
@faststore/components
@faststore/core
@faststore/graphql-utils
@faststore/lighthouse
@faststore/sdk
@faststore/ui
commit: |
@faststore/api
@faststore/cli
@faststore/components
@faststore/core
@faststore/graphql-utils
@faststore/lighthouse
@faststore/sdk
@faststore/ui
commit: |
|
Valeu pela revisão, @hellofanny! Ponto a ponto:
Descrição: ajustei. Agora ela diz que, com a configuração padrão da v3, isto é defesa em profundidade, porque o |
What's the purpose of this pull request?
FastStore v3 runs on Next.js 13.5, which has no release that fixes GHSA-2464-fhr4-w9xw (critical RCE in Image Optimization with SVG; affected range
>= 10.0.0, <= 15.5.27). The root cause is thelibrsvgbundled insharp(CVE-2026-96889, GHSA-wq5f-xc86-pv6w), and the advisory's workaround issharp >= 0.35.5.Next 13 does not ship its own
sharp: it loads the one declared by@faststore/core(^0.32.6, which also has GHSA-rgj7-g3m4-5g8c and GHSA-f88m-g3jw-g9cj).With the default v3 config this is defense in depth, not a direct exposure. The core uses
loader: 'custom', and/_next/imagereturns 404 in our tests on Node 20, 22 and 24 (we observed this but didn't trace the cause in Next's code). The bump still matters for stores that customized image handling, and it clears thesharpadvisories from scanners.How it works?
@faststore/core:sharp^0.32.6→^0.35.5.@faststore/coreengines.node:>=18→>=20.9.0. The binding constraint is[email protected]itself, which declaresnode >=20.9.0. Yarn 1 already fails the install on Node 18 because of that, whatever the core declares. The core'senginesonly makes the requirement visible. Only the core changes, because it's the package that pullssharp.fix:on purpose. The release runslerna version --conventional-commits, and a!/BREAKING CHANGE:would bump the v3 line to4.0.0, which already exists on npm. The new Node.js minimum goes into the release notes instead.ci.ymlruns on a[20, 22]matrix. Chromatic publishes only from the Node 22 job.CI_NODE_VERSIONis added to Turbo'sglobalEnv, so each Node version gets its own remote cache entry instead of reusing the other job's results.release.yml,packages-preview.ymland Volta (root, core, storybook) use Node22.23.4.pnpm-lock.yamlregenerated with pnpm 9.15.5 and formatted with the repo's prettier, so the diff only contains thesharpchange.Notes for stores (release notes)
>=20.9.0is now required to install@faststore/core3.x. Stores on WebOps already build on Node 20 or 22. Local development on Node 18 must move to Node 20.9+ (22 recommended).sharpdirectly now gets0.35.5through the core.How to test it?
pnpm buildandpnpm testpass on Node 24 (core 155, api 79, sdk 50, cli 38, components 12), and CI covers Node 20 and 22next startof the built core serves the home pageoptimizeImagewith[email protected]outputs webp, avif, png and jpeg at the requested size (reviewed on Node 18.19, 20, 22 and 24)yarn installof[email protected]on Node 18 fails withThe engine "node" is incompatible, as expectedNot covered: a real v3 store. Stores pick the fix up after updating
@faststore/cli/@faststore/coreand rebuilding in WebOps.