Skip to content

chore(deps): clear 21 of 23 high-severity advisories - #779

Merged
Ardnived merged 2 commits into
mainfrom
claude/chore-deps-sahajcloud-security
Sep 14, 2026
Merged

Ardnived merged 2 commits into
mainfrom
claude/chore-deps-sahajcloud-security

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Weekly dependency security survey (Monday). pnpm audit --audit-level=high reported 23 high rows on main; this takes it to 2, both unfixable upstream today. Moderates drop 15 → 6 as a side effect.

Two files change: pnpm-lock.yaml and pnpm-workspace.yaml. package.json is untouched.

On the count. pnpm audit reports one row per vulnerable resolution, so 23 rows is 21 distinct GHSAs — brace-expansion is flagged twice each for GHSA-mh99-v99m-4gvg and GHSA-rgw5-rvv9-x895, once per vulnerable major line (1.x and 5.x). The tables below list the 19 distinct advisories this clears. Dependabot's "21 high" on the default branch counts the distinct set.

Most of this needed no range change — the lockfile was just stale

pnpm-workspace.yaml already carried js-yaml: ^4.3.0, postcss: ^8.5.10 and brace-expansion@^1.0.0: ^1.1.13, and every one of those ranges already admits the patched build. The lockfile had simply been resolved before those versions existed. A targeted pnpm update was the whole fix:

Package From → to Advisories
brace-expansion 1.1.16 → 1.1.18, 5.0.6 → 5.0.9 GHSA-mh99-v99m-4gvg, GHSA-rgw5-rvv9-x895, GHSA-3jxr-9vmj-r5cp
fast-uri 3.1.3 → 3.1.7 GHSA-f65p-4m7j-42xc, GHSA-fph4-wmhf-6fwf, GHSA-5jgf-p345-68v8, GHSA-jqff-g426-hqxp, GHSA-v2hh-gcrm-f6hx, GHSA-7p8r-x3mc-p8w7
js-yaml 4.3.0 → 4.3.2 GHSA-5p4m-2wfm-xmqj, GHSA-2883-xcg3-v3hh
nanoid 3.3.15 → 3.3.19 GHSA-28wg-ghj8-5hjv, GHSA-2v37-7h3g-55p8
postcss 8.5.17 → 8.5.28 GHSA-r28c-9q8g-f849
browserslist 4.28.6 → 4.28.9 GHSA-c83g-rgw3-j3cx, GHSA-73wf-gq98-2v4g
socket.io-parser 4.2.6 → 4.2.7 GHSA-2m8v-j782-fhvr
nodemailer 9.0.3 → 9.1.1 GHSA-2x7j-588g-ccc2

fast-uri carries six of those: two SSRF (malformed IPv6 normalization, repeated hostname percent-decoding) and four host confusion. Its only entry point here is [email protected]/8.20.0, which parses $id/$ref URIs and never dials one — so the SSRF pair is not reachable by this route, and all six are worth taking for the host-confusion parsing alone.

nodemailer was in the same stale-lockfile class, not an override case — see the review thread. Root package.json declares ^9.0.3 and @payloadcms/[email protected] declares ^9.0.1; both admit 9.1.1, and main carried a single entry, so there was no duplicate to flatten. GHSA-2x7j-588g-ccc2 (quadratic addressparser) is dev/preview-only here in any case: production email goes through resendAdapter(), and nodemailer is reached only when SMTP_URL is set (Mailpit).

One needed a new override

[email protected] pins undici at 7.28.0 exactly, so no in-range refresh can reach the fix. The override takes it to ^7.29.1 — same major, patch-only — and carries a comment in pnpm-workspace.yaml saying why. GHSA-4cwx-7wf7-3272 (cross-user disclosure via a degenerate private-cache directive) is genuinely reachable: undici backs every server-side fetch.

What I checked for breakage

  • pnpm lint, pnpm typecheck, pnpm typecheck:tests — clean
  • Unit lane: 1955 tests / 138 files, all passing
  • pnpm build — passes. This one matters most: GitHub Actions does not build this app, Railway does, so a resolution change that broke the Next build would otherwise surface only on deploy. postcss and browserslist both sit in that build chain.
  • Dropping the nodemailer override (b8923bd) leaves the lockfile's packages: and snapshots: sections byte-identical to the commit that passed the build above, so no re-build was needed. pnpm install --frozen-lockfile, the lean gate, and pnpm audit were all re-run on it.

Every bump is patch/minor within an existing major, so no changelog carries a breaking-changes section to read.

What is deliberately not fixed

image-size 2.0.2 — GHSA-w3rx-r6r6-pgpr and GHSA-5p2g-fcmc-qvqq, the 2 rows that remain. Both name >=2.0.3 as the fix, and 2.0.3 is not published; 2.0.2 is still the newest release. There is nothing to bump to.

This one is live rather than theoretical, so it gets its own ticket rather than being waved through: #780. detectOrientationHook calls imageSize(req.file.data) on the raw buffer of every non-SVG upload, and the advisories are infinite loops in the ICNS, JXL and HEIF parsers. The surrounding try/catch is no protection — an infinite loop never throws, it wedges the event loop.


🤖 Generated with Claude Code

https://claude.ai/code/session_01ACdgNFkxAVBPwWtRumd6kC

Weekly security survey. `pnpm audit --audit-level=high` reported 23 high
advisories; this takes it to 2, both unfixable upstream (see below).

Most of them needed no version-range change at all. The lockfile was simply
stale against ranges this repo already permits — `pnpm-workspace.yaml`
already carried `js-yaml: ^4.3.0`, `postcss: ^8.5.10` and
`brace-expansion@^1.0.0: ^1.1.13`, all of which admit the patched builds.
A targeted `pnpm update` resolved them:

- brace-expansion 1.1.16 → 1.1.18, 5.0.6 → 5.0.9 (GHSA-mh99-v99m-4gvg,
  GHSA-rgw5-rvv9-x895, GHSA-3jxr-9vmj-r5cp)
- fast-uri 3.1.3 → 3.1.7 — five advisories: SSRF via IPv6 normalization and
  repeated percent-decoding, plus three host-confusion variants
  (GHSA-f65p-4m7j-42xc, GHSA-fph4-wmhf-6fwf, GHSA-5jgf-p345-68v8,
  GHSA-jqff-g426-hqxp, GHSA-v2hh-gcrm-f6hx, GHSA-7p8r-x3mc-p8w7)
- js-yaml 4.3.0 → 4.3.2 (GHSA-5p4m-2wfm-xmqj, GHSA-2883-xcg3-v3hh)
- nanoid 3.3.15 → 3.3.19 (GHSA-28wg-ghj8-5hjv, GHSA-2v37-7h3g-55p8)
- postcss 8.5.17 → 8.5.28 (GHSA-r28c-9q8g-f849)
- browserslist 4.28.6 → 4.28.9 (GHSA-c83g-rgw3-j3cx, GHSA-73wf-gq98-2v4g)
- socket.io-parser 4.2.6 → 4.2.7 (GHSA-2m8v-j782-fhvr)

Two needed an override, because a parent pins them exactly and no in-range
refresh can reach the fix. Both stay inside their current major:

- undici 7.28.0 → 7.29.1 (GHSA-4cwx-7wf7-3272). [email protected] pins `7.28.0`
  exactly. Reachable: undici backs every server-side fetch.
- nodemailer 9.0.3 → 9.1.1 (GHSA-2x7j-588g-ccc2). This only flattens a stale
  duplicate onto a version `@payloadcms/email-nodemailer`'s own `^9.0.1`
  range already allows. Dev/preview-only in practice — production email goes
  through `resendAdapter()`.

Checked for breakage: lint, typecheck (src and tests), the 1955-test unit
lane, and `pnpm build`. The build matters most here — GitHub Actions does
not build this app, Railway does, so a resolution change that breaks the
Next build would otherwise surface only on deploy.

Not fixed, because no patched version exists: image-size 2.0.2
(GHSA-w3rx-r6r6-pgpr, GHSA-5p2g-fcmc-qvqq). 2.0.3 is named as the fix but is
unpublished. This one is live rather than theoretical, so it gets its own
ticket instead of a bump.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017GLeY9yN4MYvwXTDbnCPau
@sydevs-bot

sydevs-bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 08:38Z address-review · attempt 1 · session · done
  • 08:38Z address-review · attempt 1 · session
  • 08:30Z adversarial-review · attempt 1 · session · done
  • 08:30Z adversarial-review · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@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

Two files, no package.json or source change, every bump patch-or-minor inside its major. All nine named packages check out against the lockfile on both sides. The diff is the size of the problem.

Two claims overstate it. fast-uri enters only via [email protected]/8.20.0, which resolve $id/$ref URIs and never dial one, so the two SSRF advisories called "worth a reviewer's eye" are unreachable this way. It also says "five" where its table lists six GHSAs, and the tables total 19 against a title claiming 21.

pnpm build locally was right — Actions does not build this app, Railway does, and postcss/browserslist sit in that chain. Link #780 from the body.

Findings

  • should-fix — the nodemailer override is one the body's own reasoning says is unneeded → pnpm-workspace.yaml:53.

What was checked

Both revisions of pnpm-workspace.yaml. Lockfile entries for all nine packages, the overrides block, every fast-uri/ajv/nodemailer/undici edge. detectOrientationHook.ts. Check runs. The search finding #780.

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


Generated by Claude Code

Comment thread pnpm-workspace.yaml 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 Sep 14, 2026
Review found the override unnecessary, and it is. Neither consumer pins
nodemailer exactly: the root `package.json` declares `^9.0.3`, and
`@payloadcms/[email protected]` declares `^9.0.1`. Both ranges admit
9.1.1, so the in-range `pnpm update` route — the one that fixed js-yaml,
postcss and brace-expansion with no new entry — reaches the patched build
on its own.

The "flattens a stale duplicate" justification was also wrong. `main`
carried exactly one nodemailer entry (9.0.3), so there was nothing to
flatten. The lockfile was stale, nothing more.

Removing the six lines and re-resolving leaves the `packages:` and
`snapshots:` sections of the lockfile byte-identical to the previous
commit. Only the overrides declaration and the recorded specifier change.
nodemailer stays at 9.1.1, one entry, GHSA-2x7j-588g-ccc2 still cleared,
and `pnpm audit --audit-level=high` still reports 2 (both image-size).

This keeps the overrides block to what its own header promises: only leaves
still flagged after an in-range parent refresh. An override here would have
been a permanent floor on a dev/preview-only path, re-checked against every
later `@payloadcms/email-nodemailer` bump, for no gain.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ACdgNFkxAVBPwWtRumd6kC
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-779 September 14, 2026 08:43 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Adopted the one finding. Pushed b8923bd.

  • Adopted — the nodemailer override: dropped, six lines. Neither consumer pins it exactly (^9.0.3 at the root, ^9.0.1 in @payloadcms/email-nodemailer), so pnpm update reaches 9.1.1 in range. main carried one entry, so nothing was flattened. Re-resolving leaves the lockfile's packages: and snapshots: byte-identical to e668bb8.

Nothing rebutted, nothing to ask.

The review summary also named three body errors, now corrected: fast-uri is six advisories, not five (two SSRF, four host confusion); the SSRF pair is unreachable through ajv, which parses $id/$ref URIs and never dials one; and 23 vs 19 is pnpm audit counting one row per vulnerable resolution, not distinct GHSAs. #780 is linked.

Gate on the new head: lint, typecheck (src and tests), 1955 unit tests — green. pnpm audit --audit-level=high still reports 2, both image-size.

🤖 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 Sep 14, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review September 14, 2026 08:54
@sydevs-bot
sydevs-bot requested a review from Ardnived September 14, 2026 08:54
@Ardnived
Ardnived merged commit 655c0db into main Sep 14, 2026
22 checks passed
@Ardnived
Ardnived deleted the claude/chore-deps-sahajcloud-security branch September 14, 2026 13:07
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Sep 14, 2026

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-779 — b8923bd4 Deployed Sep 14, 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.

3 participants