Repository navigation
fix(security): Fix 10 security issues in next, sharp - #805
Open
aikido-autofix[bot] wants to merge 1 commit into
Open
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 |
This branch has not been deployed
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 vulnerabilities in image optimization (AVIF/libheif), memory corruption, and high-severity DoS/SSRF issues.
✅ Code not affected by breaking changes.
✅ No breaking changes from either the Next.js (15.4.8 => 15.5.28) or sharp (0.34.5 => 0.35.5) upgrades affect this codebase.
Next.js upgrade findings:
No usage of
experimental.dynamicIOorexperimental.cacheComponentsNo usage of
useMDXComponentsNo usage of
experimental.strictNextHeadNo usage of
window.next.turbopackNo usage of
unstable_rootParamsNo usage of AMP features
No usage of
cookies()orheaders()fromnext/headersNo middleware files found
Sharp upgrade findings:
Sharp is not a dependency in this codebase (not found in any package.json files)
No imports or usage of sharp library detected
The codebase uses Next.js primarily for the demo application (
packages/demo-nextjs) with basic routing and React components, but does not utilize any of the experimental or deprecated features affected by the breaking changes. The Node.js version requirement (>=18) is already compatible with sharp 0.35.x's requirement of >=20.9.0, though sharp is not actually used in this project.All breaking changes by upgrading next from version 15.4.8 to 15.5.28 (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 2 critical 🚨 CVEs
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/OPTIONSrequest usingTransfer-Encoding: chunkedcould trigger reque...🤖 Remediation details
Fix critical and high-severity vulnerabilities in
nextandsharpShort summary
This PR remediates multiple vulnerabilities in two packages:
next(the direct dependency) andsharp(a transitive dependency pulled in bynext). The fix updates the exact-pinnednextversion in both the rootpackage.jsonand thepackages/demo-nextjsworkspacepackage.jsonfrom15.4.8to15.5.28, which also causessharpto resolve to the patched version0.35.5inyarn.lock.next
nextis declared as an exact pin (15.4.8) in two places: the rootpackage.json(devDependencies) and thepackages/demo-nextjsworkspacepackage.json(dependencies). Both pins were updated to15.5.28— the minimum version that satisfies every advisory's patched-version floor across the full set of CVEs targeting this package. Because both manifests carried the identical exact pin15.4.8, they form a related-package alignment group and move together to the same target. Theyarn.lockwas refreshed viayarn install --ignore-engines --ignore-scriptsfrom the repo root, collapsing the previously split lockfile entries into a singlenext@15.5.28resolution.sharp
sharpis a transitive-only optional dependency; it is not declared in any project manifest directly. It was previously resolved to0.34.5undernext@15.4.8's^0.34.3range, which does not admit0.35.5. Upgradingnextto15.5.28causednext's published optional-dependency spec forsharpto widen to^0.34.3 || ^0.35.5, which Yarn then resolved to0.35.5— the minimum patched version — during the same lockfile refresh. Noresolutionsoverride was required.Version changes
next15.4.8(exact, rootpackage.json)15.5.28next15.4.8(exact,packages/demo-nextjs/package.json)15.5.28sharp0.34.5(lockfile)0.35.5next