Skip to content

fix(deps): close 12 Dependabot alerts — Next.js, postcss, sharp - #177

Merged
zaridan merged 1 commit into
mainfrom
fix/deps-next-security
Aug 2, 2026
Merged

fix(deps): close 12 Dependabot alerts — Next.js, postcss, sharp#177
zaridan merged 1 commit into
mainfrom
fix/deps-next-security

Conversation

@zaridan

@zaridan zaridan commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🟡 NEEDS YOUR DECISION

No new decisions of yours are encoded — but no bot has reviewed this yet, so it cannot be 🟢. Gates green locally: next build 0, tsc 0, biome 0, vitest 87 files / 1742 tests. Verdict updates once review lands and is adjudicated.

Closes all 12 open Dependabot alerts.

What was actually vulnerable

All twelve alerts trace to one root cause: next 16.2.10. postcss and sharp are Next's own dependencies.

Package Was Now Patched at
next 16.2.10 16.2.12 16.2.11
postcss 8.5.16 hoisted, 8.4.31 nested under next 8.5.25 8.5.18
sharp 0.34.5 0.35.3 0.35.0

Which advisories actually reach this app

Checked against the code rather than taken at face value:

Advisory Applies? Why
SSRF in Server Actions (high) Yes web/src/lib/{actions,auth-actions,agent-actions,mailbox-actions}.ts
Denial of service in Server Actions (high) Yes same
Middleware / proxy bypass (high) No requires Turbopack; not used
SSRF via rewrites (high) No no rewrites in next.config.mjs
Image Optimization DoS via SVG (medium) No no image configuration
Cache confusion, Server Function disclosure, Edge payload (medium ×4) Partly patched regardless by the same bump

Scope is the Agent Inbox (web/) only. The engine's own dependencies were already clean.

Why the diff is bigger than three lines

Neither transitive package moves on the version bump alone. Next pins postcss to exactly 8.4.31 in a nested tree, and declares sharp as an optional dependency at ^0.34.5. Both needed the existing overrides block tightened — postcss was at ^8.5.10, too loose to catch either advisory, and sharp was absent.

Overrides also only take effect on a clean resolve. npm install against an existing node_modules left both packages at their vulnerable versions with no warning; three attempts looked like they had worked and had not. The fix required rm -rf node_modules package-lock.json before install, which is why 102 top-level lockfile entries moved. Most of that is sharp's per-platform binaries tracking 0.35.3.

One thing worth seeing rather than discovering later: two optional dev entries now resolve to @emnapi 2.0.0-alpha.3, pulled by @rolldown/binding-wasm32-wasi. They are lock entries for a wasm32-wasi platform this project never installs on — not installed code — and sharp's own emnapi stays at stable 1.11.3. Flagged because an alpha version appearing in a lockfile should never pass without an explanation.

Verification

  • next build — exit 0. This is the one that matters: postcss and sharp are build-time, so a passing production build is the real proof the bumps are safe. All 14 routes compiled.
  • tsc --noEmit — exit 0
  • biome check . — exit 0, 316 files
  • vitest run — 87 files, 1742 tests, exit 0

🤖 Generated with Claude Code

All twelve open alerts traced to one root cause: next 16.2.10. postcss and
sharp are Next's own dependencies.

- next 16.2.10 -> 16.2.12 (patched at 16.2.11)
- postcss 8.5.16 / 8.4.31 -> 8.5.25 (patched at 8.5.18)
- sharp 0.34.5 -> 0.35.3 (patched at 0.35.0)

Two of the four high-severity Next advisories are live against this app: SSRF and
denial of service in Server Actions, which web/src/lib/*-actions.ts uses. The
other two do not apply — the middleware bypass needs Turbopack, and the rewrite
SSRF needs rewrites; this app uses neither, and next.config.mjs has no image
configuration, which rules out the SVG image-optimization advisory as well.

Neither transitive package moves on the version bump alone. Next pins postcss to
exactly 8.4.31 in a nested tree and declares sharp as an optional dependency at
^0.34.5, so both needed the existing overrides block tightened: postcss from
^8.5.10, which was too loose to catch either advisory, and sharp added.

The lockfile churn is larger than the three lines suggest — 102 top-level entries
— because the overrides only take effect on a clean resolve. Most of it is
sharp's per-platform binaries moving in step with 0.35.3. Note two optional dev
entries now resolve to @emnapi 2.0.0-alpha.3, pulled by @rolldown's wasm32-wasi
binding; they are lock entries for a platform this project never installs on, not
installed code, and sharp's own emnapi stays at stable 1.11.3.

Verified: next build succeeds, which is what actually exercises postcss and
sharp. tsc 0, biome 0, vitest 87 files / 1742 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@zaridan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d5173630-26a5-46e3-a01d-4ec983a096f7

📥 Commits

Reviewing files that changed from the base of the PR and between 8c42a6b and 9c17f85.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json
  • web/package.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zaridan

zaridan commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@zaridan
zaridan merged commit 121d4e0 into main Aug 2, 2026
5 checks passed
@zaridan
zaridan deleted the fix/deps-next-security branch August 2, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant