Repository navigation
fix(security): Fix 10 security issues in next, sharp - #791
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 10 security issues in next, sharp |
aikido-autofix
Bot
deleted the
fix/aikido-security-update-packages-140931365-4kz4
branch
October 14, 2026 04:03
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. This update includes breaking changes that require manual migration.
Where your code is affected:
Root
package.json(line 5):"node": ">=18"packages/embed/package.json(line 11):"node": ">=18"packages/embed-react/package.json(line 7):"node": ">=18"yarn.lock: Sharp 0.34.5 is currently installed and used as a dependencyImpact:
Sharp 0.35.0+ requires Node.js >= 20.9.0, but your codebase specifies
"node": ">=18"in the engines field. This means the project currently supports Node.js 18.x, which will be incompatible with the upgraded sharp version. While sharp is an indirect dependency (installed by Next.js for image optimization), the version mismatch will cause installation or runtime failures on Node.js 18.x environments.Remediation:
Update the
engines.nodefield in allpackage.jsonfiles to">=20.9.0"to match sharp's new requirement, and ensure all development, CI/CD, and production environments are running Node.js 20.9.0 or higher.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 two packages:
next(the direct dependency, carrying the bulk of the CVEs) andsharp(a transitive optional dependency ofnext). Thenextversion was updated from15.4.8to15.5.24in both the rootpackage.jsonand thepackages/demo-nextjs/package.jsonworkspace member manifest, which also caused the lockfile to resolvesharpto the patched0.35.5. Theyarn.lockat the repo root reflects all resolved version changes.next
nextwas declared as an exact-pinned direct dependency at15.4.8in two places: the rootpackage.json(devDependencies) and thepackages/demo-nextjs/package.jsonworkspace member (dependencies). Both pins were updated to15.5.24—the minimum version that satisfies every patched-version floor across all listed advisories—andyarn installwas run from the lockfile root to refreshyarn.lock. Because both manifests used the same exact pin, related-package alignment required updating both in the same pass; leaving the workspace member at15.4.8would have kept a vulnerable lockfile entry alive.sharp
sharpis not a direct dependency; it is pulled in as an optional dependency ofnext. Atnext@15.4.8, the declared range was^0.34.3, which resolved to the vulnerable0.34.5. After bumpingnextto15.5.24, that release widens the range to^0.34.3 || ^0.35.3, which allows Yarn to resolvesharpto0.35.5—the minimum patched version forGHSA-wq5f-xc86-pv6w. No direct manifest entry forsharpwas added; the fix is entirely a consequence of the parentnextbump and the resulting lockfile refresh.Version changes
next15.4.815.5.24package.jsondevDependencies)next15.4.815.5.24packages/demo-nextjs/package.json)sharp0.34.50.35.5next)@next/env15.4.815.5.24nextparent bump@next/swc-linux-x64-gnu15.4.815.5.24nextparent bump@next/swc-linux-x64-musl15.4.815.5.24nextparent bump@next/swc-darwin-arm6415.4.815.5.24nextparent bump@next/swc-darwin-x6415.4.815.5.24nextparent bump@next/swc-linux-arm64-gnu15.4.815.5.24nextparent bump@next/swc-linux-arm64-musl15.4.815.5.24nextparent bump@next/swc-win32-arm64-msvc15.4.815.5.24nextparent bump@next/swc-win32-x64-msvc15.4.815.5.24nextparent bump@img/sharp-linux-x640.34.50.35.5sharptransitive bump@img/sharp-linuxmusl-x640.34.50.35.5sharptransitive bump@img/colour^1.0.0resolved^1.1.0resolvedsharptransitive bumpclient-only0.0.1next@15.5.24