Skip to content

fix(security): Fix 9 security issues in next, sharp - #796

Closed
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-150085823-fknu
Closed

aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-150085823-fknu

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Upgrade Next.js and Sharp to fix critical RCE in AVIF processing and multiple high-severity vulnerabilities including SSRF, DoS, and CPU exhaustion attacks.

✅ Code not affected by breaking changes.

✅ No breaking changes from either the Next.js (15.4.8 => 15.5.24) or sharp (0.34.5 => 0.35.5) upgrades affect this codebase.

Next.js breaking changes checked:

  • experimental.dynamicIO / experimental.cacheComponents: Not used in the codebase

  • useMDXComponents: Not used in the codebase

  • experimental.strictNextHead: Not used in the codebase

  • cookies() / headers() sync access restrictions: Not used in the codebase

  • window.next.turbopack: Not used in the codebase

  • AMP deprecation: Not used in the codebase

  • unstable_rootParams: Not used in the codebase

Sharp breaking changes checked:

  • Node.js version requirement (>= 20.9.0): The codebase specifies node >= 18 in package.json, but CI/CD workflows use Node.js 24, which satisfies the new requirement

  • Sharp is only used as a transitive dependency through Next.js (found in yarn.lock), not directly imported or used in the codebase

  • Deprecated API removals (failOnError, paletteBitDepth, sharpen properties, format.jp2k): Not used in the codebase

The Next.js demo package (packages/demo-nextjs) uses Next.js 15.4.8 and will be upgraded to 15.5.24, but it doesn't use any of the removed or changed experimental features.

All breaking changes by upgrading next from version 15.4.8 to 15.5.24 (CHANGELOG)

Version Description
15.5.0
refactor: rename experimental.dynamicIO to experimental.cacheComponents: #81562
15.5.0
Remove useMDXComponents argument: #80871
15.5.0
Remove experimental.strictNextHead: #81882
15.5.0
[Cache Components] Disallow sync access of cookies & headers at runtime: #82564
15.5.0
Turbopack: set window.next.turbopack instead: #82580
15.5.0
[Deprecation Warnings]: add amp deprecation warning: #82551
15.5.0
[Deprecation Warnings]: add unstable_rootParams deprecation warning: #82582
15.5.0
Stabilize node middleware support: #81907

All breaking changes by upgrading sharp from version 0.34.5 to 0.35.5 (CHANGELOG)

Version Description
0.35.0
Drop support for Node.js 18, now requires Node.js >= 20.9.0.
0.35.0
Remove install script from package.json file. Compiling from source is now opt-in via the build script.
0.35.0
Lossy AVIF output is now tuned using SSIMULACRA2-based iq quality metrics.
0.35.0
Add limitInputChannels with a default value of 5.
0.35.0
Remove deprecated failOnError constructor property.
0.35.0
Remove deprecated paletteBitDepth from metadata response.
0.35.0
Remove deprecated properties from sharpen operation.
0.35.0
Rename format.jp2k as format.jp2 for API consistency.
✅ 9 CVEs resolved by this upgrade, including 1 critical 🚨 CVE

This PR will resolve the following CVEs:

Issue Severity           Description
GHSA-2xp9-vwfh-vxw4
🚨 CRITICAL
[next] A vulnerability in the underlying libheif library used by sharp which Next.js uses for image optimization can lead to remote code execution when AVIF files are optimized.

Until a fix has propagated, optimization of AVIF files is disabled.
CVE-2026-44578
HIGH
[next] A server-side request forgery vulnerability in self-hosted Next.js applications allows attackers to craft WebSocket upgrade requests that proxy arbitrary requests to internal or external destinations, potentially exposing internal services or cloud metadata. Vercel-hosted deployments are unaffected.
CVE-2026-44579
HIGH
[next] Applications using Partial Prerendering with Cache Components are vulnerable to connection exhaustion via crafted POST requests to server actions, causing request-body handling deadlocks that consume server resources and lead to denial of service. Malicious actors can exhaust file descriptors and server capacity, preventing legitimate users from accessing the application.
GHSA-mwv6-3258-q52c
HIGH
[next] A malicious HTTP request to App Router endpoints can cause server deserialization to hang and consume CPU, resulting in denial of service (DoS).
GHSA-q4gf-8mx6-v5v3
HIGH
[next] A specially crafted HTTP request to App Router Server Function endpoints can trigger excessive CPU usage during deserialization, causing denial of service (DoS).
GHSA-8h8q-6873-q5fj
HIGH
[next] A specially crafted HTTP request to App Router Server Function endpoints can trigger excessive CPU usage during deserialization, causing denial of service (DoS).
CVE-2026-29057
MEDIUM
[next] HTTP request smuggling vulnerability in Next.js rewrites with chunked DELETE/OPTIONS requests allows attackers to bypass route restrictions and access unintended backend endpoints. An attacker could smuggle malicious requests to internal or admin routes through request boundary disagreement between proxy and backend.
GHSA-w37m-7fhw-fmv9
MEDIUM
[next] A malicious HTTP request can expose compiled source code of Server Functions in affected React packages and frameworks, potentially revealing business logic through information disclosure.
GHSA-wq5f-xc86-pv6w
HIGH
[sharp] A memory vulnerability in the upstream librsvg dependency can lead to remote code execution on glibc-based Linux systems under certain runtime conditions. The vulnerability affects SVG image decoding and requires specific runtime conditions to exploit.
🤖 Remediation details

Bump next and resolve sharp to address multiple security vulnerabilities

Short summary

This PR remediates security vulnerabilities in two packages — next and sharp — by updating their declared versions in the root package.json and the packages/demo-nextjs/package.json workspace manifest, with yarn.lock refreshed to match. Both packages had vulnerable versions pinned exactly; bumping next to 15.5.24 in both manifests simultaneously resolved the stale sharp transitive to a patched version.

next

next was pinned at 15.4.8 in two places: the root package.json (devDependencies) and the packages/demo-nextjs/package.json workspace manifest (dependencies). Both pins were updated to 15.5.24 — the minimum version that satisfies every advisory's patched-version floor across the full set of reported CVEs. Because both manifests declared the same exact version, both had to move together; leaving either at 15.4.8 would have kept a vulnerable lockfile entry alive.

sharp

sharp was a transitive optional dependency pulled in by next under the selector ^0.34.3, which resolved to the vulnerable 0.34.5. After bumping next to 15.5.24, that release widens its declared range for sharp to ^0.34.3 || ^0.35.3, which Yarn resolved to 0.35.5 — the minimum patched version for the reported advisory. No direct sharp entry was added to any manifest; the fix is entirely a consequence of the next parent bump, and the old stale sharp@^0.34.3 → 0.34.5 lockfile entry was fully removed after cleanup.

Version changes

Package From To Why updated
next (root package.json) 15.4.8 15.5.24 Direct CVE fix
next (packages/demo-nextjs/package.json) 15.4.8 15.5.24 Direct CVE fix — workspace pin aligned with root
sharp 0.34.5 0.35.5 Transitive CVE fix after next parent bump
@next/env 15.4.8 15.5.24 Lockfile refresh — sibling of next
@next/swc-linux-x64-gnu 15.4.8 15.5.24 Lockfile refresh — sibling of next
@next/swc-linux-x64-musl 15.4.8 15.5.24 Lockfile refresh — sibling of next
@img/sharp-linux-x64 0.34.5 0.35.5 Lockfile refresh — platform binary sibling of sharp
@img/sharp-linuxmusl-x64 0.34.5 0.35.5 Lockfile refresh — platform binary sibling of sharp

@pr-auditor

pr-auditor Bot commented Oct 20, 2026

Copy link
Copy Markdown

✅ Security Analysis Results

No security issues found. 3 files reviewed.


@pr-auditor rescan to re-run · Powered by Claude Sonnet 5.5 · Docs · #security-engineering-team

@jenkins-tf

Copy link
Copy Markdown
Collaborator

[BOT] Preview available with hash b10282bd66cb6735679b12fea8d77ea2573880e1 here.

@aikido-autofix

Copy link
Copy Markdown
Author

Aikido's automated cron job opened a newer AutoFix. It fixes the same vulnerabilities and more: fix(security): Fix 12 security issues in next, sharp

@aikido-autofix aikido-autofix Bot closed this Oct 24, 2026
@aikido-autofix
aikido-autofix Bot deleted the fix/aikido-security-update-packages-150085823-fknu branch October 24, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant