Skip to content

fix(security): Fix 10 security issues in next, sharp - #794

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

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

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Oct 14, 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 connection 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 upgrade findings:

  • The codebase uses Next.js only in packages/demo-nextjs (a demo package)

  • No next.config.js file exists, so no experimental configuration options are used

  • No usage of experimental.dynamicIO, experimental.cacheComponents, experimental.strictNextHead, useMDXComponents, unstable_rootParams, or AMP features

  • No synchronous access to cookies() or headers() at runtime

  • The demo uses standard Next.js features (App Router, Pages Router, basic components) that are unaffected by the breaking changes

Sharp upgrade findings:

  • Sharp is not used anywhere in the codebase (no imports or requires found)

  • Sharp is listed as a dependency in the root package.json (version 0.35.5), but it's not imported or used in any source files

  • The Node.js version requirement change (>= 20.9.0) is compatible since the project already requires Node.js >= 18

All breaking changes listed in the changelogs have zero impact on this codebase.

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.
✅ 10 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-h25m-26qc-wcjf
HIGH
[next] A specially crafted HTTP request to App Router Server Function endpoints can trigger excessive CPU usage, out-of-memory exceptions, or server crashes, resulting in denial of service.
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

Fix critical and high-severity vulnerabilities in next and sharp

Short summary

This PR remediates multiple vulnerabilities in next (the primary vulnerable package) and sharp (a vulnerable transitive dependency of next). The fix updates the exact-pinned next version in two manifests — the root package.json (devDependencies) and the packages/demo-nextjs/package.json workspace member (dependencies) — from 15.4.8 to 15.5.24. The yarn.lock is refreshed accordingly, resolving sharp from 0.34.5 to 0.35.5 as a transitive consequence of the parent bump.

next

next was declared as an exact pin (15.4.8) in both the root package.json and the packages/demo-nextjs workspace manifest, making it a direct dependency in both locations. Version 15.4.8 is affected by multiple high- and critical-severity vulnerabilities; the minimum version that clears all of them is 15.5.24. Both manifests were updated to 15.5.24 (preserving the exact-pin style), and yarn install was run from the workspace root to refresh yarn.lock, removing the stale next@15.4.8 lockfile entry entirely.

sharp

sharp is not declared directly in any manifest; it is pulled in as an optional dependency of next. Version 0.34.5 (resolved under next@15.4.8's ^0.34.3 spec) carries a high-severity vulnerability. Bumping next to 15.5.24 widens its declared optional dependency spec to ^0.34.3 || ^0.35.3, which allows Yarn to resolve sharp to 0.35.5 — the minimum patched version. No direct manifest entry or resolutions override was needed; the fix flows entirely through the parent bump.

Version changes

Package From To Why updated
next 15.4.8 15.5.24 Direct CVE fix (root package.json + packages/demo-nextjs/package.json)
sharp 0.34.5 0.35.5 Transitive CVE fix after parent bump (next)
@next/env 15.4.8 15.5.24 Lockfile refresh — sibling of next at same version
@next/swc-linux-x64-gnu 15.4.8 15.5.24 Lockfile refresh — sibling of next at same version
@next/swc-linux-x64-musl 15.4.8 15.5.24 Lockfile refresh — sibling of next at same version
@img/sharp-linux-x64 (not present) 0.35.5 Lockfile refresh — new optional dep introduced by sharp@0.35.5
@img/sharp-linuxmusl-x64 (not present) 0.35.5 Lockfile refresh — new optional dep introduced by sharp@0.35.5
@img/colour (not present) 1.1.0 Lockfile refresh — new dep introduced by sharp@0.35.5

@pr-auditor

pr-auditor Bot commented Oct 14, 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 72301cef841a2977837630b94e45d0cfbfd9a699 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 8 security issues in next, sharp

@aikido-autofix aikido-autofix Bot closed this Oct 16, 2026
@aikido-autofix
aikido-autofix Bot deleted the fix/aikido-security-update-packages-143435979-mrdg branch October 16, 2026 03:37
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