Skip to content

chore(deps): bump sharp to 0.35.5 for the librsvg use-after-free - #929

Merged
sydevs-bot merged 3 commits into
mainfrom
claude/chore-deps-sharp-librsvg
Oct 13, 2026
Merged

sydevs-bot merged 3 commits into
mainfrom
claude/chore-deps-sharp-librsvg

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Change outline

The one dependency that moved

sharp: ^0.35.4 → ^0.35.5 in package.json, and one [email protected] in the lockfile — not two. That single-copy result is the whole point: our caret and [email protected]'s optionalDependencies.sharp: ^0.35.4 both already permit 0.35.5, so this is an in-range refresh, not a pin. pnpm-workspace.yaml's overrides comment asks for exactly that before anything is pinned, and nothing is added there.

Measured, because the three routes differ:

route result
pnpm install --lockfile-only after the manifest edit two copies — next keeps 0.35.4, the vulnerable one survives
pnpm dedupe one copy, but 824 unrelated lockfile deletions
pnpm update sharp --depth 99 one copy, 0.35.5

The lockfile churn that rides along

--depth 99 re-resolves in-range transitives at the same time: rollup 4.63.6→4.64.5, dompurify 3.4.16→3.4.17, node-abi 3.96.0→3.98.0, acorn +8.19.0, caniuse-lite, electron-to-chromium, node-releases, baseline-browser-mapping, update-browserslist-db, cheap-ruler 4.1.0→4.1.1, and second copies of postcss (8.5.30) and source-map-js (1.2.2) under vite. All patch-level, all build-time, none a major.

The third file — main's red unit test

tests/unit/submission-data.spec.ts carries #930's fix, because fix-ci repairs a main failure on the branch it finds. #922 narrowed URL_PATTERN so 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 now see example.com, so the case pairs with the email-block case above it as one contrast keyed on block type.

The case is renamed too: howDidYouHear is a text block, not an address question, and see example.com is not an address. What it proves is that an authored text block is not exempt from the URL scan, which is what still URL-scans an answer authored as a text block now says.

The other three high advisories, and why they are not here

advisory verdict
nodemailer 9.1.1 — GHSA-v53p-9fqp-m79j, GHSA-prgh-xp8r-p3m5 Fix is 10.0.6 — a major. @payloadcms/[email protected] (latest) declares ^9.1.1, so reaching it means forcing a major past a declared range. pnpm-workspace.yaml says every override "stays within the package's existing major". Left for a human call.
braces 3.0.3 — GHSA-vfj7-8cjw-p6xm No fix exists. The advisory page reads "Patched versions: None"; npm's latest is 3.0.3, published 2024-05-21. pnpm audit's >=3.0.4 names a version nobody published.
source-map-js 1.2.1 — GHSA-68fv-2mgg-jv7q Patch-level and overridable, but the override lives in pnpm-workspace.yaml, which prAllowlistGlobs does 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

  • Lean gate at 7b90b81: ✓ lint, ✓ typecheck (src), ✓ typecheck (tests), ✓ unit — 177 files, 2328 passed, 0 failed
  • The failure this branch first hit was main's, not its own: tests/unit/submission-data.spec.ts was red at f823484 with this branch stashed. Closes fix(tests): main is red — two PRs fixed the email-as-URL defect two ways #930.
  • Targeted specs: tests/unit/submission-data.spec.ts, green in the lean gate's run.
  • Build: N/A locally; Railway builds the preview.

Manual verification

  1. Upload an SVG to Images on the preview and confirm it stores and lists.
  2. Confirm a raster image still renders through next/image from the R2 delivery host.

Notes for reviewer

  • Reachability is narrow, and worth saying plainly. Payload is never handed sharp, so no upload is rasterised by it. next.config.mjs does not set dangerouslyAllowSVG, so next/image refuses SVG and never reaches librsvg. The one direct caller is scripts/generate-logo-pngs.ts, on repo-local SVGs. The bump is worth taking because it costs nothing, not because the hole is open.
  • No /security-review: securityReview.triggerPattern matches no changed path.
  • No /simplify or /code-review pass: 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.
  • chore(deps): settle the three high advisories no in-range bump reaches #931 holds the three high advisories no in-range bump reaches, so the table above is a summary and not the backlog.
Detail

sharp 0.35.5 (27 Sep 2026) also adds an upper bound on linear and GIF delay array lengths, widens accepted extend dimensions, improves gain-map handling for extract/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=high on 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

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
@railway-app

railway-app Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-929 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Oct 12, 2026 at 10:35 pm UTC
1 service not affected by this PR
  • mailpit

@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-929 October 12, 2026 21:58 Destroyed
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 12, 2026
@sydevs-bot

sydevs-bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running
CI fix 1

recent dispatches
  • 22:28Z address-review · attempt 1 · session · done
  • 22:28Z address-review · attempt 1 · session
  • 22:20Z review-pr · attempt 1 · session · done
  • 22:20Z review-pr · attempt 1 · session
  • 22:01Z fix-ci · attempt 1 · session · done

Written 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
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-929 October 12, 2026 22:07 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Fixed the red check in a35a700. Lean gate green: lint, both typechecks, 2328 unit tests.

The failure was main's, not this branch's. #930 holds the diagnosis: #922 stopped URL_PATTERN reading an address's domain half as a link, then #919 landed a case probing the free-text scan with [email protected]. Each PR was green on its own base.

The probe is now see example.com — the same input the email-block case above judges invalid_email, so the pair reads as one contrast keyed on block type. This PR carries #930's fix.

Two findings for #930:

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 12, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🧐 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:287
  • should-fix — the restored case's name claims an address; neither the field nor the value is one — tests/unit/submission-data.spec.ts:280
  • consider — the three remaining high advisories have no ticket — package.json:76

What was checked

  • Reachability holds. No dangerouslyAllowSVG in next.config.mjs. sharp is imported only by scripts/generate-logo-pngs.ts, and never by src/payload.config.ts.
  • Single copy holds. [email protected] is gone; only 0.35.5 remains, in the two peer variants main already carried.
  • Churn is in range. 15 packages moved. dompurify and postcss are both already pinned by overrides, so neither left its bound.
  • #930's second question answered. #919's email arm is not dead weight: the specs at :248 and :273, untouched here, turn on invalid_email and disposable_email, which no URL scan produces.
  • No contract touched. src/payload-types.ts and src/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

Comment thread tests/unit/submission-data.spec.ts Resolved
Comment thread tests/unit/submission-data.spec.ts Resolved
Comment thread package.json Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 12, 2026
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
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-929 October 12, 2026 22:33 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

All three review findings adopted. Pushed 7b90b81.

Lean gate at 7b90b81: lint, both typechecks, 177 files / 2328 unit tests — all green. Docs checked, nothing stale.

Anomaly: issue_read method:get_labels on this PR answers "Could not resolve to an Issue with the number of 929". method:get reads it fine.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 12, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 12, 2026 22:41
@sydevs-bot
sydevs-bot requested a review from Ardnived October 12, 2026 22:41
@sydevs-bot
sydevs-bot enabled auto-merge October 12, 2026 22:41
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit add7e86 Oct 13, 2026
60 of 64 checks passed
@sydevs-bot
sydevs-bot deleted the claude/chore-deps-sharp-librsvg branch October 13, 2026 05:16

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-929 — 7b90b816 Deployed Oct 12, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

fix(tests): main is red — two PRs fixed the email-as-URL defect two ways

3 participants