Repository navigation
chore(deps): clear 21 of 23 high-severity advisories - #779
Conversation
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
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 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— thenodemaileroverride 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
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
|
Adopted the one finding. Pushed b8923bd.
Nothing rebutted, nothing to ask. The review summary also named three body errors, now corrected: Gate on the new head: lint, typecheck (src and tests), 1955 unit tests — green. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Weekly dependency security survey (Monday).
pnpm audit --audit-level=highreported 23 high rows onmain; this takes it to 2, both unfixable upstream today. Moderates drop 15 → 6 as a side effect.Two files change:
pnpm-lock.yamlandpnpm-workspace.yaml.package.jsonis untouched.Most of this needed no range change — the lockfile was just stale
pnpm-workspace.yamlalready carriedjs-yaml: ^4.3.0,postcss: ^8.5.10andbrace-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 targetedpnpm updatewas the whole fix:fast-uricarries 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/$refURIs 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.nodemailerwas in the same stale-lockfile class, not an override case — see the review thread. Rootpackage.jsondeclares^9.0.3and@payloadcms/[email protected]declares^9.0.1; both admit 9.1.1, andmaincarried a single entry, so there was no duplicate to flatten. GHSA-2x7j-588g-ccc2 (quadraticaddressparser) is dev/preview-only here in any case: production email goes throughresendAdapter(), and nodemailer is reached only whenSMTP_URLis set (Mailpit).One needed a new override
[email protected]pins undici at7.28.0exactly, 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 inpnpm-workspace.yamlsaying 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— cleanpnpm 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.postcssandbrowserslistboth sit in that build chain.packages:andsnapshots:sections byte-identical to the commit that passed the build above, so no re-build was needed.pnpm install --frozen-lockfile, the lean gate, andpnpm auditwere 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.3as 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.
detectOrientationHookcallsimageSize(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 surroundingtry/catchis no protection — an infinite loop never throws, it wedges the event loop.🤖 Generated with Claude Code
https://claude.ai/code/session_01ACdgNFkxAVBPwWtRumd6kC