Repository navigation
fix(deps): bump the Payload family to 3.87.1, dropping vulnerable image-size - #856
Conversation
…ge-size [email protected] depended on [email protected], which carries two high advisories: GHSA-5p2g-fcmc-qvqq (JXL and HEIF parsers loop forever) and GHSA-w3rx-r6r6-pgpr (the ICNS parser does the same). Both are reachable through uploaded media, since payload calls image-size to read upload dimensions. payload 3.87.0 replaced image-size with image-dimensions, so the bump removes the vulnerable copy from the graph rather than pinning a patched one. Our own direct image-size (^2.0.4, used by the Images orientation hook) was already past the patched floor and is untouched. All eleven @payloadcms/* packages move together, because the family does not support mixed versions. Checked before bumping: - 3.87.0 and 3.87.1 release notes list no breaking changes. 3.87.1 is a patch, carrying mongoose, undici and MCP SDK security fixes. - @payloadcms/[email protected] still pins drizzle-kit to exactly 0.31.7, so patches/[email protected] still applies. The lockfile's patch_hash entry is unchanged. - drizzle-orm stays at 0.45.2, so no schema or migration surface moves. Stopping at 3.87.1 rather than 3.90.2 keeps this revertable as a security fix. Catching up to the latest minor belongs in a routine batch. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AgM7wdYR2wE6AGjbWWXGX6
The exact-version rule was stated against 3.86.0, and used `@payloadcms/[email protected]` beside `[email protected]` as its example of the mixed-version break. The family is on 3.87.1 now, so that example had become the state the repo is actually in. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AgM7wdYR2wE6AGjbWWXGX6
|
🚅 Deployed to the SahajCloud-pr-856 environment in sahajcloud
1 service not affected by this PR
|
|
🤖 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
Right shape and size: three files, and a bump beats pinning image-size via pnpm.overrides.
The notes miss one thing: both consumers already run the family at 3.88.x, pinning @payloadcms/[email protected] exactly. Live preview and Lexical JSON are cross-repo formats, so this repo sits a minor behind its clients. Do not widen this PR for it — the follow-up target is 3.88.x, not 3.90.2.
GitHub reports 4 high advisories where pnpm audit sees 2. The other 2 survive only in a <details>. Worth a ticket.
Findings
should-fixpnpm-lock.yaml:3766 — the no-other-changes claim is inaccurate.considerpackage.json:67 — consumers sit a minor ahead.considerAGENTS.md:94 — the pin is stated twice.
What was checked
- Both lockfiles'
packages:keys: 13 family packages move,image-sizeout,image-dimensionsin, 4 duplicates dropped, no new third-party. - Consumers: both
package.jsons,live-preview/protocol.ts,RichText/.src/payload-types.tsis not in the diff, sotypes:cmsis unaffected.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The paragraph stated the family's exact version twice — once as the current pin and once in the mixed-version example. Both restate what package.json owns, so each bump had to hand-edit them or leave an assertion that silently goes stale. The rule does not need the number. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AgLGfKxFwQ7JYautJQAZt6
|
Adopted all three review threads. Pushed
Not actioned: the 4-vs-2 advisory gap the review called worth a ticket. This run does not open issues without a human verb, so the body records it instead. Lean gate green on 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
pnpm auditreported:[email protected]reached us through[email protected], and payload 3.87.0 replaced it withimage-dimensions.@payloadcms/*packages move 3.86.0 → 3.87.1 together, because the family does not support mixed versions.pnpm audit --audit-level=highgoes from 2 high to 0. Everything else the lockfile does is a dedupe onto versions already present —image-dimensionsis the only package that enters the graph.Changes
package.json/pnpm-lock.yaml—payload,db-postgres,email-nodemailer,next,plugin-cloud-storage,plugin-form-builder,plugin-nested-docs,plugin-seo,richtext-lexical,ui,typescript-plugin: 3.86.0 → 3.87.1. Transitively@payloadcms/drizzle,graphqlandtranslationsfollow.[email protected]leaves the graph;[email protected]enters it.@babel/code-frame,@babel/helper-module-imports,@babel/runtime,@types/estree,@types/node,acorn,ajv,pg-protocol,pump,tinyglobby,ws. Each lands on a version already in the lockfile, and 4 unreferenced duplicates drop out.ws8.21.0 → 8.21.3, underengine.ioandsocket.io-adapter, is the only runtime edge among them.src/migrations/AGENTS.md— the exact-version rule stated the family's version twice, once as the current pin and once in the mixed-version example. Both restated whatpackage.jsonowns, so every bump had to hand-edit them or leave an assertion that goes stale silently. The rule now names no version.Preview
Test results
fb965d3.check.sh --full): ✓pnpm test(unit + integration) and the Railwaypnpm build, on983f13fpnpm install --frozen-lockfile: ✓ clean against the changed lockfile (1282 entries)pnpm generate:types: no diff — 3.87.1's generator produces the samesrc/payload-types.ts, so nothing changes for WeMeditateWeb'spnpm types:cmsManual verification
Notes for reviewer
src/migrations/AGENTS.mdsays to re-check the patch key on any family bump.@payloadcms/[email protected]still pins drizzle-kit to exactly0.31.7and drizzle-orm to0.45.2, and the lockfile'spatch_hashfor[email protected]is byte-identical. No migration surface moves.@payloadcms/[email protected]exactly, and WeMeditateWeb pins that pluslive-preview,richtext-lexicalandsdkat^3.88.0. Live preview and Lexical JSON are formats shared with those repos, so this repo currently sits a minor behind its own consumers.verified against Payload 3.86.0breadcrumbs are left alone on purpose —src/migrations/AGENTS.md:29andsrc/globals/AGENTS.md:110. Both record what someone actually reproduced a behaviour against, and this run re-verified neither.Detail
The advisories.
GHSA-5p2g-fcmc-qvqq(high) — image-size's JXL and HEIF parsers loop forever on crafted input.GHSA-w3rx-r6r6-pgpr(high) — the ICNS parser does the same. Both patched in[email protected]. Reachable here rather than theoretical: payload called image-size to read upload dimensions, and this app takes uploads.Why a bump and not an override. A
pnpm.overridesentry forcingimage-size@^2.0.3would also have cleared the audit, and left a permanent pin behind to explain. Since 3.87.0 drops the dependency outright, the bump removes the package instead of patching it.Our own image-size is a separate copy and was never vulnerable.
image-size@^2.0.4is a direct dependency, used bysrc/collections/Images/hooks/detectOrientationHook.ts. It resolved above the patched floor already, which is why the audit named only thepayload>image-sizepaths. It is untouched here.What the lockfile does beyond the family. Verified by diffing the
packages:keys and everysnapshots:dependency edge betweenorigin/mainand this branch. No package name leaves the graph — our ownimage-sizecopy stays — andimage-dimensionsis the only one that enters. The 4 duplicates that drop are@babel/[email protected],@babel/[email protected],@babel/[email protected]and[email protected], each unreferenced after the dedupe.What was read before bumping. The 3.87.0 and 3.87.1 release notes list no breaking changes, removals or deprecations. 3.87.0 is the release that swapped image-size for image-dimensions (payloadcms/payload#17571). 3.87.1 is a patch carrying mongoose, undici and MCP SDK security fixes — none of which we reach, since this app is on postgres.
Unrelated finding, recorded here rather than acted on. The push warned that GitHub sees 4 high advisories on
main, wherepnpm auditreported 2. The moderate count agrees at 6. This PR clears the 2 thatpnpm auditnames. Whatever the other 2 are, they are not visible from the registry audit endpoint, and finding them needs the Dependabot alert list. No ticket filed — this run does not open issues without a human verb.Filed by the Monday dependency survey. Not the first Monday of the month, so no routine minor/patch batch rides along.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AgM7wdYR2wE6AGjbWWXGX6