[Aikido] Fix 68 security issues in axios, form-data, next - #28
Open
aikido-autofix[bot] wants to merge 1 commit into
Open
[Aikido] Fix 68 security issues in axios, form-data, next#28aikido-autofix[bot] wants to merge 1 commit into
aikido-autofix[bot] wants to merge 1 commit into
Conversation
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 axios, form-data, and next to fix critical SSRF, prototype pollution, and proxy bypass vulnerabilities.
✅ Code not affected by breaking changes.
✅ No breaking changes from either the axios or Next.js upgrades affect this codebase.
Axios (1.7.8 => 1.16.0):
baseURLconfiguration combined with request URLs), so theallowAbsoluteUrlsbreaking change does not apply.Next.js (14.2.10 => 15.5.21):
The Next.js example app (
examples/example-web-nextjs) already usesexport const dynamic = "force-dynamic"in route handlers, so the breaking change about disabling automatic static generation does not affect it.The
next/imagecomponent usage has no leading/trailing spaces in thesrcattribute.The codebase already requires Node.js >=18, meeting the new minimum version requirement of 18.18.
No usage of deprecated APIs like
geo,ip,useMDXComponents,unstable_rootParams,forwardRefin Link, or any other deprecated features mentioned in the changelog.No synchronous usage of
cookies(),headers(),params, orsearchParamsthat would require async migration.No usage of
"use server","use cache", or other experimental features that have new restrictions.The ESLint configuration uses version 8, which is compatible (Next.js 15 supports ESLint v9, but v8 continues to work).
All breaking changes by upgrading axios from version 1.7.8 to 1.18.1 (CHANGELOG)
allowAbsoluteUrlsconfig option\ror\ncharacters are now rejected and throw "Invalid character in header content" to block CRLF injectionmaxBodyLengthandmaxContentLengthlimits which were previously silently ignoredparseProtocolnow strictly requires a colon in the protocol separator; strings that loosely parsed as protocols before may no longer matchhttp:andhttps:URLs that omit//are now rejected withERR_INVALID_URLAll breaking changes by upgrading next from version 14.2.10 to 15.5.21 (CHANGELOG)
squooshin favor ofsharpas optional dependency for next/imageContent-Dispositiontoattachmentfor next/imagesrchas leading or trailing space in next/imagenext/headchildren reconciler by defaultgeoandipfromNextRequestnext lint"use server"and"use cache") at the same level will no longer be allowed.thisandargumentsin server functions: server functions can no longer usethisorarguments, which will break existing server functions that rely on these features.superin static class methods with server function directives: static class methods with server function directives cannot usesuper, breaking code that previously did so."use cache"is used withoutdynamicIOenabled: builds will now fail if"use cache"is used without enabling thedynamicIOflag.internal_disableSyncDynamicAPIWarningsflagcolorminfeature fromcssnanoexperimental.reactOwnerStackflagrootParams()is now a plain Promise (not exotic)--no-manglingCLI option fornext builddevIndicatorsoptionsappIsrStatusandbuildActivitydevIndicators.buildActivityPositionand renamed topositionoutput: exportis used with intercepting routesuseCacheis enabled and Edge runtime is usedrootParams()incachescopeforwardRefremoved from Link in App RouterlegacyBehaviorprop--turbopackflag withnext start, otherwise throws errorserver.mjsfor standalone withtype: moduleuseMDXComponentsargument removedexperimental.strictNextHeadremovedcookies&headersat runtime in Cache Componentsexperimental.dynamicIOrenamed toexperimental.cacheComponentsunstable_rootParamsdeprecated with warning✅ 68 CVEs resolved by this upgrade, including 6 critical 🚨 CVEs
This PR will resolve the following CVEs:
data:scheme URLs that bypass memory limits, causing unbounded memory allocation and process crashes (DoS) on Node.js. The issue affects versions 0.28.0 through 0.30.1 and 1.x before 1.12.0.This issue affects form-data: < 2.5.4, 3.0.0 - 3.0.3, 4.0.0 - 4.0.3.
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.fetchcache keys are derived from lossy text decoding of request bodies, allowing distinct requests with different bodies to share cache entries and leak confidential data between callers. The vulnerability affects the App Router and is fixed by keying the cache on raw body bytes instead.beforeInteractivescript serialization insufficiently escapes untrusted input, allowing attackers to break script boundaries and execute arbitrary JavaScript in the browser when untrusted data is passed to script props.fetchresponses fails to account for request body differences, allowing unauthorized users to receive cached responses containing confidential data from other requests. This information disclosure vulnerability affects applications using the App Router.pagePropsdata instead of HTML under certain misconfigurations, potentially leading to information disclosure. This affects self-hosted deployments where responses may be cached without explicit cache-control headers.🤖 Remediation details
Fix critical/high/medium security vulnerabilities in
next,axios, andform-dataShort summary
This PR remediates known vulnerabilities in three packages —
next,axios, andform-data— declared or resolved inexamples/example-web-nextjs/package.jsonand itsyarn.lock. The direct dependencynextwas bumped in the manifest;axiosandform-dataare transitive dependencies whose stale lockfile entries were refreshed. Aresolutionsoverride was also added to address a newsharpvulnerability introduced as a side-effect of thenextupgrade, because no stablenextrelease in the15.xline can resolvesharpto a patched version without a semver-major override.next
nextis a direct dependency pinned exactly at14.2.10inexamples/example-web-nextjs/package.json. The manifest was updated to15.5.21— the minimum stable release that satisfies all patched-version requirements across the full set ofnextadvisories in scope — andyarn installrefreshed the lockfile entry.eslint-config-nextwas bumped in lockstep from13.4.13to15.5.21to preserve the project's existing practice of keeping these two related packages on matching versions.axios
axiosis a transitive dependency pulled in bylangfuse-nodeunder the spec^1.7.4. The lockfile entry was stale at1.7.8; because the declared range already admits1.16.0and above, no manifest change was required — runningyarn upgrade 'axios@^1.7.4'was sufficient to refresh the lockfile entry to1.18.1, satisfying the>=1.16.0patched-version floor required by the highest-severity advisories in scope.yarn upgradetransiently addedaxiosas a direct dependency inpackage.json, which was immediately removed since it was and remains transitive-only.form-data
form-datais a transitive dependency ofaxios, declared byaxiosas^4.0.0(later^4.0.5after the axios upgrade). The lockfile entry was stale at4.0.0; it was resolved to4.0.6automatically whenaxioswas upgraded, satisfying the>=4.0.6patched-version floor. No separate manifest or lockfile action was needed beyond theaxiosrefresh.sharp
sharpwas not present in the lockfile before this PR. Upgradingnextfrom14.2.10to15.5.21introducedsharpas a new optional transitive dependency vianext'soptionalDependencies: "^0.34.3", which resolved to the vulnerable0.34.5(GHSA-f88m-g3jw-g9cj, fixed in0.35.0). Every publishednextrelease in the15.xline declaressharp@^0.34.3, making0.35.0unreachable through a parent bump because it is a semver-major step; the onlynextreleases that declare^0.35.xare unstable16.xcanary/preview builds. A targetedresolutions: { "sharp": "^0.35.0" }entry was added toexamples/example-web-nextjs/package.jsonas a last resort, resolving the lockfile entry to0.35.3.Version changes
next14.2.1015.5.21eslint-config-next13.4.1315.5.21nextaxios1.7.81.18.1^1.7.4entry (parent:langfuse-node)form-data4.0.04.0.6axiosupgradesharp0.34.50.35.3nextupgrade; patched viaresolutionsoverride (semver-major barrier innext@15.x)Note
Medium Risk
Next 14→15 is a major upgrade with many framework breaking changes; risk is moderated because this is an example app with minimal app code, but builds and runtime behavior should still be verified.
Overview
Security-driven dependency refresh for
examples/example-web-nextjs: directnextmoves from 14.2.10 → 15.5.21 andeslint-config-nextfrom 13.4.13 → 15.5.21 so the sample app tracks a patched framework and matching ESLint preset.A new
resolutionsentry forcessharp^0.35.0 because Next 15 pulls in image tooling that would otherwise stay on a vulnerable 0.34.x line that cannot be fixed by bumpingnextalone within 15.x.yarn.lockis regenerated: transitiveaxios(vialangfuse-node) andform-data(via axios) land on patched versions, and the lockfile picks up Next 15’s toolchain (e.g.@typescript-eslint8.x, updated eslint plugins, optionalsharpplatform packages).Reviewed by Cursor Bugbot for commit e3f4916. Bugbot is set up for automated code reviews on this repo. Configure here.