Skip to content

[Aikido] Fix 8 security issues in devalue, astro, sharp - #15

Closed
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-72187802-5vwh
Closed

[Aikido] Fix 8 security issues in devalue, astro, sharp#15
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-72187802-5vwh

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Jul 23, 2026

Copy link
Copy Markdown

Upgrade devalue, Astro, and sharp to fix memory exhaustion DoS, SSR host header injection, image processing RCE, XSS via slot names, and script tag injection vulnerabilities. This update includes breaking changes that require manual migration.

⚠️ Code affected by breaking changes.

⚠️ The upgrade has one critical breaking change that affects this codebase:

Node.js Version Requirement (Astro 6.0.0)

  • Where your code is affected: .github/workflows/deploy.yml:11 specifies node-version: 22 without a specific minor version

  • Impact: Astro 6.0.0 requires Node.js >= 22.12.0. The current GitHub Actions workflow uses node-version: 22 which will use the latest 22.x available, but local development environments or other CI systems may use older Node.js 22.x versions (< 22.12.0) that are incompatible with Astro 6.0.0.

  • Remediation: Update the workflow to specify node-version: 22.12.0 or higher, and ensure all development environments and CI/CD systems use Node.js >= 22.12.0. Add an .nvmrc file with 22.12.0 to standardize the Node.js version across all environments.

All other breaking changes in the Astro 6.0.0 and Sharp 0.35.0 upgrades do not affect this codebase as the project does not use:

  • Astro integration/adapter APIs

  • Content collections or loaders

  • Astro.glob(), ViewTransitions, or other deprecated components

  • Session drivers, CSP configuration, or experimental flags

  • Sharp directly in the codebase

  • CommonJS config files (uses ESM with .mjs)

  • Deprecated Sharp properties or methods

All breaking changes by upgrading astro from version 5.18.1 to 6.4.8 (CHANGELOG)

Version Description
6.0.0
Removes entryPoints on astro:build:ssr hook (Integration API)
6.0.0
Deprecates loadManifest() and loadApp() from astro/app/node (Adapter API)
6.0.0
Removes session test driver
6.0.0
Renames entryType to entrypointResolution in Adapter API and updates possible values: legacy-dynamic becomes explicit, self becomes auto
6.0.0
Removes the deprecated emitESMImage() function
6.0.0
Deprecates session driver string signature
6.0.0
Adds support for converting SVGs to raster images (PNGs, WebP, etc) to the default Sharp image service
6.0.0
Removes routes on astro:build:done hook (Integration API)
6.0.0
Throws an error when getImage() from astro:assets is called on the client
6.0.0
Removes the old app.render() signature (Adapter API)
6.0.0
Upgrades to Zod v4 for schema validation
6.0.0
Updates how schema types are inferred for content loaders with schemas (Loader API)
6.0.0
Removes support for CommonJS config files
6.0.0
Removes prefetch() with option
6.0.0
Removes support for routes with percent-encoded percent signs (e.g. %25)
6.0.0
Deprecates Astro in getStaticPaths()
6.0.0
Removes the option to define dynamic schemas in content loaders as functions and adds a new equivalent createSchema() property (Loader API)
6.0.0
Updates trailing slash behavior of endpoint URLs
6.0.0
Updates Markdown heading ID generation
6.0.0
Deprecates import.meta.env.ASSETS_PREFIX
6.0.0
Changes the values allowed in params returned by getStaticPaths()
6.0.0
Changes TypeScript configuration
6.0.0
Removes the previously deprecated Astro.glob()
6.0.0
Removes the ability to render Astro components in Vitest client environments
6.0.0
Deprecates createExports() and start() (Adapter API)
6.0.0
Deprecates NodeApp from astro/app/node (Adapter API)
6.0.0
Removes the handleForms prop for the <ClientRouter /> component
6.0.0
Increases minimum Node.js version to 22.12.0
6.0.0
Adds frontmatter parsing support to renderMarkdown in content loaders - frontmatter is now extracted and excluded from HTML output
6.0.0
Removes the deprecated <ViewTransitions /> component
6.0.0
Removes RouteData.generate from the Integration API
6.0.0
Changes the default routing configuration value of i18n.routing.redirectToDefaultLocale from true to false
6.0.0
Deprecates exposed astro:transitions internals
6.0.0
Updates dependency shiki to v4
6.0.0
Removes the setManifestData method from App and NodeApp (Adapter API)
6.0.0
Removes rewrite() from Actions context
6.0.0
Removes the experimental.failOnPrerenderConflict flag and replaces it with a new configuration option prerenderConflictBehavior
6.0.0
Deprecates astro:schema and z from astro:content in favor of astro/zod
6.0.0
Removes exposed astro:actions internals
6.0.0
Changes the shape of SSRManifest properties and adds several new required properties in the Adapter API
6.0.0
Allows Astro.csp and context.csp to be undefined instead of throwing errors when csp: true is not configured - methods must now be accessed conditionally
6.0.0
Upgrades to Vite v7.0 as the development server and production bundler
6.0.0
Changes how styles of responsive images are emitted
6.0.0
Changes integration hooks and HMR access patterns in the Integration API
6.0.0
Removes the unused astro:ssr-manifest virtual module
6.0.0
Updates import.meta.env values to always be inlined
6.0.0
Updates <script> and <style> tags to render in the order they are defined
6.0.0
Removes legacy content collection support
6.0.0
Removes the experimental.fonts flag and replaces it with a new configuration option fonts
6.0.0
Removes the experimental.csp flag and replaces it with a new configuration option security.csp

All breaking changes by upgrading sharp from version 0.34.5 to 0.35.0 (CHANGELOG)

Version Description
0.35.0
Drop support for Node.js 18, now requires Node.js >= 20.9.0.
0.35.0
Remove install script from package.json file. Compiling from source is now opt-in via the build script.
0.35.0
Lossy AVIF output is now tuned using SSIMULACRA2-based iq quality metrics.
0.35.0
Add limitInputChannels with a default value of 5.
0.35.0
Remove deprecated failOnError constructor property.
0.35.0
Remove deprecated paletteBitDepth from metadata response.
0.35.0
Remove deprecated properties from sharpen operation.
0.35.0
Rename format.jp2k as format.jp2 for API consistency.
✅ 8 CVEs resolved by this upgrade

This PR will resolve the following CVEs:

Issue Severity           Description
CVE-2026-42570
HIGH
[devalue] Deserialization of sparse arrays causes excessive memory allocation due to JavaScript engine quirks, leading to denial of service through memory exhaustion.
CVE-2026-54299
HIGH
[astro] SSR apps with prerendered error pages fetch them via HTTP using an unvalidated Host header, allowing attackers to redirect requests to arbitrary hosts and read responses, enabling information disclosure.
AIKIDO-2026-10849
MEDIUM
[astro] Unescaped slot names in server-rendered hydrated components allow attackers to inject HTML/JavaScript into SSR responses, enabling reflected XSS attacks when user-controlled input is used as slot names.
CVE-2026-41067
MEDIUM
[astro] A case-sensitive regex in the defineScriptVars function fails to sanitize script tag closures, allowing attackers to bypass sanitization using case variations or whitespace (e.g., </Script>, </script >) to inject arbitrary HTML/JavaScript via the define:vars directive.
CVE-2026-45028
MEDIUM
[astro] Encryption replay vulnerability in server island props and slots allows attackers to swap encrypted values between components, potentially leading to XSS when slots containing unescaped HTML are substituted with user-controlled props.
CVE-2026-50146
MEDIUM
[astro] Unescaped slot names in client directives allow attackers to break out of data attributes and inject arbitrary HTML, enabling reflected XSS attacks during server-side rendering.
CVE-2026-54298
MEDIUM
[astro] A server-side rendering vulnerability in the spreadAttributes function fails to escape object keys when spreading props onto HTML elements, allowing attackers to inject arbitrary HTML attributes and event handlers when keys come from untrusted sources like APIs or URL parameters.
GHSA-f88m-g3jw-g9cj
HIGH
[sharp] Multiple high-severity vulnerabilities in upstream libvips dependency allow remote code execution when processing untrusted image input (GIF, TIFF, VIPS formats).
🤖 Remediation details

Fix security vulnerabilities in astro, devalue, and sharp

Short summary

This PR remediates security vulnerabilities in three npm packages — astro, devalue, and sharp — by updating the root package.json and refreshing package-lock.json. The astro direct dependency was bumped across a major version boundary (5→6), which also resolved the devalue transitive vulnerability. A companion bump to @astrojs/react was required for astro 6.x compatibility. A targeted overrides entry was added to force sharp to its patched version, since astro@6.x does not natively allow sharp@0.35.x.

astro

astro is a direct dependency declared in the root package.json. Its spec was raised from ^5.7.10 to ^6.4.6, resolving to 6.4.8 in the lockfile. This major bump was necessary because all of the reported astro vulnerabilities are only patched in the 6.x line (the earliest fix being 6.1.6, with the full set requiring 6.4.6). Because @astrojs/react 4.x requires astro 5.x, its spec was simultaneously raised to ^6.0.0 to maintain a working integration under astro 6.x.

devalue

devalue is a transitive dependency pulled in by astro. Under astro@5.x, it was declared as ^5.6.2 and resolved to the vulnerable 5.7.1. After bumping astro to 6.4.6, that release declares devalue: "^5.8.1", which causes npm to resolve devalue to 5.8.2 — satisfying the patched version floor of 5.8.1 without any additional manifest change or override.

sharp

sharp is an optional transitive dependency of astro, resolved to the vulnerable 0.34.5. astro@6.4.6 declares sharp: "^0.34.0", which excludes the patched 0.35.0 release; the first astro version to natively allow ^0.35.0 is 7.0.4, which is beyond the required fix target. A targeted overrides entry ("sharp@<0.35.0": "0.35.0") was therefore added to the root package.json to force only vulnerable instances to 0.35.0, leaving any already-patched instances unaffected.

Version changes

Package From To Why updated
astro ^5.7.105.18.1 ^6.4.66.4.8 Direct CVE fix; major bump required for patched 6.x line
@astrojs/react ^4.2.1 ^6.0.06.0.1 Required for astro 6.x peer compatibility after parent bump
devalue 5.7.1 5.8.2 Transitive fix after parent bump (astro now declares ^5.8.1)
sharp 0.34.5 0.35.0 Override (sharp@<0.35.0) — astro@6.x pins ^0.34.0, excluding patched 0.35.x

@aikido-autofix

Copy link
Copy Markdown
Author

Closed by Aikido: a new AutoFix has been created → #17

@aikido-autofix aikido-autofix Bot closed this Aug 14, 2026
@aikido-autofix
aikido-autofix Bot deleted the fix/aikido-security-update-packages-72187802-5vwh branch August 14, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants