Repository navigation
chore(deps): bump sharp to 0.35.5 for the librsvg use-after-free - #929
Conversation
GHSA-wq5f-xc86-pv6w (CVSS v4 8.9, CWE-416): librsvg before 2.63.2 frees memory it later reads, which sharp links for SVG rasterisation. sharp 0.35.5 bundles the patched 2.63.2. No override. `[email protected]` already declares `sharp: ^0.35.4`, so the caret alone reaches 0.35.5 — only the lockfile pinned the old build. `pnpm update sharp --depth 99` re-resolves it in range and leaves one copy, which is what pnpm-workspace.yaml's overrides comment asks for before a pin. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CKvsn2r74PTUiSfPwmbx8n
|
🚅 Deployed to the SahajCloud-pr-929 environment in sahajcloud
1 service not affected by this PR
|
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
`still URL-scans an address question authored as a text block` asserted that `[email protected]` in a `text` block raises `urls_not_allowed`. #922 removed that outcome everywhere: the bare-domain arm no longer reads the domain half of an address as a link. #919 landed the case on top of it, so `main` is red at f823484 too — the failure is not this branch's, and fixing it here is what the handler does with one. The property under test is the branch, not the value: a block the author made `text` gets the URL scan, while an `email` one gets the address check. `see example.com` carries that, and is the same input the `email`-block case above judges `invalid_email`, so the pair reads as one contrast keyed on block type. Reintroducing a `text` exemption in `valueSchemaFor` turns the case red, so it is not vacuous. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136exQRmeiDqDAMeS3tj9t9
|
Fixed the red check in The failure was The probe is now Two findings for #930:
🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The bump is right-sized. One caret, one lockfile, no override, and the route taken is the one pnpm-workspace.yaml's own comment prescribes: refresh in range before pinning anything. Nothing bespoke is added and no contract surface moves.
The body no longer describes the PR. A second commit fixed main's red unit test here, which fix-ci requires, and nothing updated the body. #930 therefore stays open as work already done, and a reviewer reading the body first is told the diff is two files.
Findings
should-fix— body contradicts the diff, and leaves #930 open —tests/unit/submission-data.spec.ts:287should-fix— the restored case's name claims an address; neither the field nor the value is one —tests/unit/submission-data.spec.ts:280consider— the three remaining high advisories have no ticket —package.json:76
What was checked
- Reachability holds. No
dangerouslyAllowSVGinnext.config.mjs.sharpis imported only byscripts/generate-logo-pngs.ts, and never bysrc/payload.config.ts. - Single copy holds.
[email protected]is gone; only0.35.5remains, in the two peer variantsmainalready carried. - Churn is in range. 15 packages moved.
dompurifyandpostcssare both already pinned byoverrides, so neither left its bound. - #930's second question answered. #919's
emailarm is not dead weight: the specs at:248and:273, untouched here, turn oninvalid_emailanddisposable_email, which no URL scan produces. - No contract touched.
src/payload-types.tsandsrc/endpoints/are untouched, so no consumer repo syncs. - Reviewer profile read.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The case fed `howDidYouHear` — a `text` block, not an address question — and `see example.com`, which is not an address. The old name claimed both. What it proves is that an authored `text` block is not exempt from the URL scan, which is what the name now says. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NVmh6cFrZEzWzLASaNUQx8
|
All three review findings adopted. Pushed
Lean gate at Anomaly: 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
sharp0.35.4 → 0.35.5, clearing GHSA-wq5f-xc86-pv6w (CVSS v4 8.9, CWE-416) — librsvg frees memory it later reads.nextalready declaressharp: ^0.35.4; only the lockfile pinned the old build.tests/unit/submission-data.spec.tscarries fix(tests): main is red — two PRs fixed the email-as-URL defect two ways #930's fix, whichfix-cilanded here. Closes fix(tests): main is red — two PRs fixed the email-as-URL defect two ways #930.Change outline
The one dependency that moved
sharp: ^0.35.4→^0.35.5inpackage.json, and one[email protected]in the lockfile — not two. That single-copy result is the whole point: our caret and[email protected]'soptionalDependencies.sharp: ^0.35.4both already permit 0.35.5, so this is an in-range refresh, not a pin.pnpm-workspace.yaml'soverridescomment asks for exactly that before anything is pinned, and nothing is added there.Measured, because the three routes differ:
pnpm install --lockfile-onlyafter the manifest editnextkeeps 0.35.4, the vulnerable one survivespnpm dedupepnpm update sharp --depth 99The lockfile churn that rides along
--depth 99re-resolves in-range transitives at the same time:rollup4.63.6→4.64.5,dompurify3.4.16→3.4.17,node-abi3.96.0→3.98.0,acorn+8.19.0,caniuse-lite,electron-to-chromium,node-releases,baseline-browser-mapping,update-browserslist-db,cheap-ruler4.1.0→4.1.1, and second copies ofpostcss(8.5.30) andsource-map-js(1.2.2) under vite. All patch-level, all build-time, none a major.The third file —
main's red unit testtests/unit/submission-data.spec.tscarries #930's fix, becausefix-cirepairs amainfailure on the branch it finds. #922 narrowedURL_PATTERNso no email address reads as a link; #919 then added a case probing the free-text scan with[email protected], which the narrowed pattern no longer matches. The probe is nowsee example.com, so the case pairs with theemail-block case above it as one contrast keyed on block type.The case is renamed too:
howDidYouHearis atextblock, not an address question, andsee example.comis not an address. What it proves is that an authoredtextblock is not exempt from the URL scan, which is whatstill URL-scans an answer authored as a text blocknow says.The other three high advisories, and why they are not here
nodemailer9.1.1 — GHSA-v53p-9fqp-m79j, GHSA-prgh-xp8r-p3m5@payloadcms/[email protected](latest) declares^9.1.1, so reaching it means forcing a major past a declared range.pnpm-workspace.yamlsays every override "stays within the package's existing major". Left for a human call.braces3.0.3 — GHSA-vfj7-8cjw-p6xmlatestis 3.0.3, published 2024-05-21.pnpm audit's>=3.0.4names a version nobody published.source-map-js1.2.1 — GHSA-68fv-2mgg-jv7qpnpm-workspace.yaml, whichprAllowlistGlobsdoes not cover — so it is not a ticketless change. Build/test-time only (postcss, sass, css-tree, magicast parsing our own source maps).All three now carry a ticket, #931, so a merged body table is not the only record of them.
Preview
Test results
7b90b81: ✓ lint, ✓ typecheck (src), ✓ typecheck (tests), ✓ unit — 177 files, 2328 passed, 0 failedmain's, not its own:tests/unit/submission-data.spec.tswas red atf823484with this branch stashed. Closes fix(tests): main is red — two PRs fixed the email-as-URL defect two ways #930.tests/unit/submission-data.spec.ts, green in the lean gate's run.Manual verification
next/imagefrom the R2 delivery host.Notes for reviewer
sharp, so no upload is rasterised by it.next.config.mjsdoes not setdangerouslyAllowSVG, sonext/imagerefuses SVG and never reaches librsvg. The one direct caller isscripts/generate-logo-pngs.ts, on repo-local SVGs. The bump is worth taking because it costs nothing, not because the hole is open./security-review:securityReview.triggerPatternmatches no changed path./simplifyor/code-reviewpass: the only hand-written source in the diff is the one spec file carried from fix(tests): main is red — two PRs fixed the email-as-URL defect two ways #930.Detail
sharp 0.35.5 (27 Sep 2026) also adds an upper bound on
linearand GIFdelayarray lengths, widens acceptedextenddimensions, improves gain-map handling forextract/rotate, and makes two TypeScript typing corrections — one of which removes a named export that never existed. Both typecheck passes are green, so nothing here imported it.pnpm audit --audit-level=highon this branch: 4 high, down from 5. Moderates unchanged at 15.🤖 Written by the sydevs autonomous loop — see what this is
🤖 Generated with Claude Code
https://claude.ai/code/session_01CKvsn2r74PTUiSfPwmbx8n