Repository navigation
fix(security): Fix 10 security issues in next, sharp - #794
Closed
aikido-autofix[bot] wants to merge 1 commit into
Closed
aikido-autofix[bot] wants to merge 1 commit into
aikido-autofix[bot] wants to merge 1 commit into
Conversation
✅ Security Analysis ResultsNo security issues found. 3 files reviewed.
|
Collaborator
|
[BOT] Preview available with hash |
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
Bot
deleted the
fix/aikido-security-update-packages-143435979-mrdg
branch
October 16, 2026 03:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsfile exists, so no experimental configuration options are usedNo usage of
experimental.dynamicIO,experimental.cacheComponents,experimental.strictNextHead,useMDXComponents,unstable_rootParams, or AMP featuresNo synchronous access to
cookies()orheaders()at runtimeThe 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 filesThe 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)
experimental.strictNextHead: #81882window.next.turbopackinstead: #82580All breaking changes by upgrading sharp from version 0.34.5 to 0.35.5 (CHANGELOG)
installscript frompackage.jsonfile. Compiling from source is now opt-in via thebuildscript.iqquality metrics.limitInputChannelswith a default value of 5.failOnErrorconstructor property.paletteBitDepthfrommetadataresponse.sharpenoperation.format.jp2kasformat.jp2for API consistency.✅ 10 CVEs resolved by this upgrade, including 1 critical 🚨 CVE
This PR will resolve the following CVEs:
libheiflibrary used bysharpwhich 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.
DELETE/OPTIONSrequests 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.🤖 Remediation details
Fix critical and high-severity vulnerabilities in
nextandsharpShort summary
This PR remediates multiple vulnerabilities in
next(the primary vulnerable package) andsharp(a vulnerable transitive dependency ofnext). The fix updates the exact-pinnednextversion in two manifests — the rootpackage.json(devDependencies) and thepackages/demo-nextjs/package.jsonworkspace member (dependencies) — from15.4.8to15.5.24. Theyarn.lockis refreshed accordingly, resolvingsharpfrom0.34.5to0.35.5as a transitive consequence of the parent bump.next
nextwas declared as an exact pin (15.4.8) in both the rootpackage.jsonand thepackages/demo-nextjsworkspace manifest, making it a direct dependency in both locations. Version15.4.8is affected by multiple high- and critical-severity vulnerabilities; the minimum version that clears all of them is15.5.24. Both manifests were updated to15.5.24(preserving the exact-pin style), andyarn installwas run from the workspace root to refreshyarn.lock, removing the stalenext@15.4.8lockfile entry entirely.sharp
sharpis not declared directly in any manifest; it is pulled in as an optional dependency ofnext. Version0.34.5(resolved undernext@15.4.8's^0.34.3spec) carries a high-severity vulnerability. Bumpingnextto15.5.24widens its declared optional dependency spec to^0.34.3 || ^0.35.3, which allows Yarn to resolvesharpto0.35.5— the minimum patched version. No direct manifest entry orresolutionsoverride was needed; the fix flows entirely through the parent bump.Version changes
next15.4.815.5.24package.json+packages/demo-nextjs/package.json)sharp0.34.50.35.5next)@next/env15.4.815.5.24nextat same version@next/swc-linux-x64-gnu15.4.815.5.24nextat same version@next/swc-linux-x64-musl15.4.815.5.24nextat same version@img/sharp-linux-x640.35.5sharp@0.35.5@img/sharp-linuxmusl-x640.35.5sharp@0.35.5@img/colour1.1.0sharp@0.35.5