[Aikido] Fix 8 security issues in esbuild, devalue, astro#6
Closed
aikido-autofix[bot] wants to merge 1 commit into
Closed
[Aikido] Fix 8 security issues in esbuild, devalue, astro#6aikido-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 → #8 |
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. This update includes breaking changes that require manual migration.
Node.js Version Requirement (Breaking Change)
Where your code is affected: The entire project is affected. The
package.jsonfile does not specify anenginesfield, and Astro 6.0.0 now requires Node.js version >=22.12.0 (previously supported 18.20.8 || ^20.3.0 || >=22.0.0). The package-lock.json shows that@astrojs/prismand other Astro 6.x dependencies now enforce"node": ">=22.12.0".Impact: The project will fail to install or run if the Node.js version is below 22.12.0. This is a hard requirement enforced by the package's engines field.
Remediation: Upgrade the Node.js runtime environment to version 22.12.0 or higher before upgrading Astro. Add an
enginesfield topackage.jsonto document this requirement and prevent installation on incompatible Node.js versions.Note: While Astro 6.0 includes many other breaking changes (TypeScript configuration changes, Vite 7 upgrade, Zod v4 upgrade, etc.), none of the other breaking changes affect this codebase because:
The codebase uses
import.meta.env.BASE_URLwhich continues to work (onlyASSETS_PREFIXwas deprecated)No content collections, integrations hooks, adapter APIs, or other advanced Astro features are used
The configuration file is already in ESM format (
.mjs)The TypeScript config extends
astro/tsconfigs/strictwhich will be automatically updated by AstroThe esbuild upgrade (0.27.7 => 0.28.1) does not introduce breaking changes that affect this codebase.
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, andastroShort summary
This PR remediates high- and medium-severity vulnerabilities in three packages:
astro,devalue, andesbuild. The fix involves a major-version bump of the directastrodependency in the rootpackage.json(from the5.xto6.xline), which also pulls in a patcheddevaluetransitively. Anoverridesentry was added to the rootpackage.jsonto force allesbuildinstances below0.28.1up to the patched version, since no stable parent-chain path could deliveresbuild ≥ 0.28.1through either theastro-nested or rootvitecopies. Thepackage-lock.jsonwas updated accordingly.astro
astrois a direct dependency declared in the rootpackage.json. Its declared range was raised from^5.7.10to^6.4.6, resolving to6.4.8in the lockfile. The entire5.xline is vulnerable across multiple CVEs spanning versions up to6.4.5; the6.xline beginning at6.1.6(and fully patched at6.4.6) is required to satisfy all advisories simultaneously. This is a semver-major bump but is the minimum change that clears all reportedastrovulnerabilities.devalue
devalueis a transitive dependency pulled in byastro. No direct declaration exists in any workspace manifest; the fix is entirely a consequence of bumpingastroto6.4.8, which declaresdevalue ^5.8.1and resolves it to5.8.1in the lockfile. The previously resolved5.7.1is vulnerable;5.8.1is the patched floor.esbuild
esbuildappears as a transitive dependency under two separate parent chains:astro → astro/node_modules/vite@7.3.5 → esbuildand the rootvite@6.4.3 → esbuild. Both chains were stuck below0.28.1—astro 6.xnestsvite ^7.3.2(no stableastrorelease upgrades this tovite 8.x), and the rootviteis pinned to6.xby@astrojs/react@4.4.2's peer dependency (no stable@astrojs/reactrelease supportsvite 8.x). After exhausting all parent-bump paths, a selector-pattern override"esbuild@<0.28.1": "0.28.1"was added to the rootpackage.json, which consolidates all three previously separateesbuildinstances into a singlenode_modules/esbuild@0.28.1entry in the lockfile.Version changes
astro^5.7.10→5.18.1resolved^6.4.6→6.4.8resolveddevalue5.7.15.8.1astroparent bumpesbuild0.27.7(astro chain) /0.25.12(vite chain)0.28.1(consolidated)esbuild@<0.28.1) — no viable parent-bump path