Repository navigation
fix(security): Fix 9 security issues in next, sharp - #796
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 12 security issues in next, sharp |
aikido-autofix
Bot
deleted the
fix/aikido-security-update-packages-150085823-fknu
branch
October 24, 2026 05:42
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 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 codebaseuseMDXComponents: Not used in the codebaseexperimental.strictNextHead: Not used in the codebasecookies()/headers()sync access restrictions: Not used in the codebasewindow.next.turbopack: Not used in the codebaseAMP deprecation: Not used in the codebase
unstable_rootParams: Not used in the codebaseSharp breaking changes checked:
Node.js version requirement (>= 20.9.0): The codebase specifies
node >= 18inpackage.json, but CI/CD workflows use Node.js 24, which satisfies the new requirementSharp is only used as a transitive dependency through Next.js (found in
yarn.lock), not directly imported or used in the codebaseDeprecated API removals (
failOnError,paletteBitDepth,sharpenproperties,format.jp2k): Not used in the codebaseThe 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)
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.✅ 9 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
Bump
nextand resolvesharpto address multiple security vulnerabilitiesShort summary
This PR remediates security vulnerabilities in two packages —
nextandsharp— by updating their declared versions in the rootpackage.jsonand thepackages/demo-nextjs/package.jsonworkspace manifest, withyarn.lockrefreshed to match. Both packages had vulnerable versions pinned exactly; bumpingnextto15.5.24in both manifests simultaneously resolved the stalesharptransitive to a patched version.next
nextwas pinned at15.4.8in two places: the rootpackage.json(devDependencies) and thepackages/demo-nextjs/package.jsonworkspace manifest (dependencies). Both pins were updated to15.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 at15.4.8would have kept a vulnerable lockfile entry alive.sharp
sharpwas a transitive optional dependency pulled in bynextunder the selector^0.34.3, which resolved to the vulnerable0.34.5. After bumpingnextto15.5.24, that release widens its declared range forsharpto^0.34.3 || ^0.35.3, which Yarn resolved to0.35.5— the minimum patched version for the reported advisory. No directsharpentry was added to any manifest; the fix is entirely a consequence of thenextparent bump, and the old stalesharp@^0.34.3 → 0.34.5lockfile entry was fully removed after cleanup.Version changes
next(rootpackage.json)15.4.815.5.24next(packages/demo-nextjs/package.json)15.4.815.5.24sharp0.34.50.35.5nextparent bump@next/env15.4.815.5.24next@next/swc-linux-x64-gnu15.4.815.5.24next@next/swc-linux-x64-musl15.4.815.5.24next@img/sharp-linux-x640.34.50.35.5sharp@img/sharp-linuxmusl-x640.34.50.35.5sharp