[Aikido] Fix 8 security issues in esbuild, devalue, astro#7
Closed
aikido-autofix[bot] wants to merge 1 commit into
Closed
[Aikido] Fix 8 security issues in esbuild, devalue, astro#7aikido-autofix[bot] wants to merge 1 commit into
aikido-autofix[bot] wants to merge 1 commit into
Conversation
Author
|
Closed by Aikido: a new AutoFix has been created → #10 |
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 esbuild, devalue, and astro to fix binary execution, memory exhaustion, SSRF, and reflected XSS vulnerabilities.
✅ Code not affected by breaking changes.
✅ No breaking changes from either the esbuild (0.27.7 => 0.28.1) or Astro (5.18.1 => 6.4.6) upgrades affect this codebase.
Key findings:
Node.js version requirement (Astro 6.0.0): The codebase has no explicit Node.js version constraint in
package.json. The package-lock.json shows Astro 6 requires Node.js >=22.12.0, but this is a runtime requirement, not a breaking code change.import.meta.env.BASE_URL usage: The codebase uses
import.meta.env.BASE_URLextensively (found in 17+ files), but does NOT use the deprecatedimport.meta.env.ASSETS_PREFIX, so the deprecation doesn't affect it.Configuration format: The project uses
astro.config.mjs(ES modules), not CommonJS, so the removal of CommonJS config support doesn't apply.TypeScript configuration: Uses the simple
extends: "astro/tsconfigs/strict"pattern, which will automatically adapt to Astro 6's TypeScript changes.No affected APIs: The codebase doesn't use any of the deprecated or removed APIs:
No Integration API hooks (
astro:build:ssr,astro:build:done)No Adapter API usage (
loadManifest(),loadApp(),NodeApp, etc.)No content collections or Zod schemas (
astro:content,astro:schema)No
Astro.glob(),ViewTransitions,ClientRouter, or ActionsNo session drivers, CSP configuration, or experimental flags
No
getStaticPaths()usageNo
<script>or<style>tags that would be affected by rendering order changesesbuild changes: The integrity check hash changes only affect installation fallback paths, not runtime behavior.
The codebase is a straightforward static site using Astro with React integration, and none of the breaking changes in Astro 6 affect its current implementation.
All breaking changes by upgrading esbuild from version 0.27.7 to 0.28.1 (CHANGELOG)
esbuildpackage, which could affect the fallback download path during installationAll breaking changes by upgrading astro from version 5.18.1 to 6.4.8 (CHANGELOG)
entryPointsonastro:build:ssrhook (Integration API)loadManifest()andloadApp()fromastro/app/node(Adapter API)testdriverentryTypetoentrypointResolutionin Adapter API and updates possible values:legacy-dynamicbecomesexplicit,selfbecomesautoemitESMImage()functionroutesonastro:build:donehook (Integration API)getImage()fromastro:assetsis called on the clientapp.render()signature (Adapter API)prefetch()withoption%25)AstroingetStaticPaths()createSchema()property (Loader API)import.meta.env.ASSETS_PREFIXparamsreturned bygetStaticPaths()Astro.glob()createExports()andstart()(Adapter API)NodeAppfromastro/app/node(Adapter API)handleFormsprop for the<ClientRouter />componentrenderMarkdownin content loaders - frontmatter is now extracted and excluded from HTML output<ViewTransitions />componentRouteData.generatefrom the Integration APIi18n.routing.redirectToDefaultLocalefromtruetofalseastro:transitionsinternalsshikito v4setManifestDatamethod fromAppandNodeApp(Adapter API)rewrite()from Actions contextexperimental.failOnPrerenderConflictflag and replaces it with a new configuration optionprerenderConflictBehaviorastro:schemaandzfromastro:contentin favor ofastro/zodastro:actionsinternalsSSRManifestproperties and adds several new required properties in the Adapter APIAstro.cspandcontext.cspto be undefined instead of throwing errors whencsp: trueis not configured - methods must now be accessed conditionallyastro:ssr-manifestvirtual moduleimport.meta.envvalues to always be inlined<script>and<style>tags to render in the order they are definedexperimental.fontsflag and replaces it with a new configuration optionfontsexperimental.cspflag and replaces it with a new configuration optionsecurity.csp✅ 8 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
createRequestFromNodeRequestwithout overridingprerenderedErrorPageFetch.data-astro-templateattributes when usingclient:*directives, allowing attackers to inject arbitrary HTML and execute reflected XSS attacks during server-side rendering.🤖 Remediation details
Fix security vulnerabilities in esbuild, devalue, and astro
Short summary
This PR remediates vulnerabilities in three npm packages —
esbuild,devalue, andastro— by updating direct dependencies in the rootpackage.jsonand refreshingpackage-lock.json. Becausedevalueandesbuildare transitive dependencies pulled in throughastroandvite, the fixes required bumpingastroand@astrojs/reactto new major versions, and adding a targetedoverridesentry foresbuildwhere no stable parent-bump path existed.astro
astrois declared directly in the rootpackage.jsonand was resolved at5.18.1, which falls within the vulnerable range for multiple advisories. The declared spec was updated from^5.7.10to^6.4.6, resolving to6.4.8in the lockfile. This is a major-version bump (5 → 6) and is the minimum change that satisfies all patched-version requirements forastroitself.devalue
devalueis a transitive dependency pulled in byastro(spec^5.6.2in astro 5.x). Bumpingastroto^6.4.6caused npm to resolvedevalueto5.8.1(astro 6.x declares^5.8.1), which satisfies the patched-version floor. No direct manifest change todevaluewas needed; the fix flows entirely from theastroparent bump.esbuild
esbuildis a transitive dependency with two resolution paths. The first path ran throughastro→vite(nested); bumpingastroto 6.x caused it to pull invite7.x as the hoisted copy, which eliminated the separatenode_modules/vite/node_modules/esbuildinstance at0.25.12. However,vite7.x still declares esbuild as^0.27.0(a 0.x caret range that caps at<0.28.0), so the resolved version remained0.27.7— below the patched floor of0.28.1. No stable parent version (astro 7.x is pre-release; vite 8.x requires it) could widen that range, so a targeted override"esbuild@<0.28.1": "0.28.1"was added to the rootpackage.jsonas a last resort. Additionally,@astrojs/reactwas bumped from^4.2.1to^5.0.0(major bump) because@astrojs/react4.x declared vite^6.4.1, which kept a separatevite6.x instance (with its own nestedesbuild0.25.x) hoisted;@astrojs/react5.x declares^7.3.2, consolidating all consumers onto the single vite 7.x copy and removing the vulnerable nested esbuild instance entirely.Version changes
astro^5.7.10/5.18.1^6.4.6/6.4.8@astrojs/react^4.2.1/4.4.2^5.0.0/5.0.7devalue5.7.15.8.1esbuild0.27.7+0.25.12(two instances)0.28.1(one instance)esbuild@<0.28.1) after all parent-bump paths exhausted; nested 0.25.x instance removed by @astrojs/react bumpvite6.4.2(hoisted)7.3.5(hoisted)@vitejs/plugin-react4.7.05.2.0