Vulnerabilities in pkg:npm/astro
PACKAGEGHSA-26w7-cxv4-gfx2 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-125: Out-of-bounds Read) affecting Astro libraries in the npm ecosystem. The issue involves remote code execution through avif image optimization. Remediation is available by upgrading affected packages to version 7.2.8.
pkg:npm/astro
Vulnerability advisories affecting package pkg:npm/astro. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-26w7-cxv4-gfx2 | - | CRITICAL | Astro: Remote code execution through AVIF image optimization |
| GHSA-376h-93r7-7g6f | CVE-2026-84376 | MODERATE | Astro: Authorization bypass from missing path-segment boundary check when stripping the configured base |
| GHSA-f48w-9m4c-m7f5 | CVE-2026-59729 | MODERATE | Astro: XSS via unescaped spread attribute names in renderHTMLElement (incomplete fix for CVE-2026-54298) |
| GHSA-7pw4-f3q4-r2p2 | CVE-2026-59727 | LOW | Astro: Cross-site scripting via unescaped transition:* directive values on hydrated islands |
| GHSA-2pvr-wf23-7pc7 | CVE-2026-54299 | HIGH | Astro: Host header SSRF in prerendered error page fetch |
| GHSA-8hv8-536x-4wqp | CVE-2026-50146 | HIGH | Astro: Reflected XSS via unescaped slot name |
| GHSA-8mv7-9c27-98vc | CVE-2026-73423 | MODERATE | Astro: composable `astro/hono` pipeline bypasses `security.checkOrigin` when `middleware()` is absent or misordered |
| GHSA-4g3v-8h47-v7g6 | CVE-2026-73422 | MODERATE | Astro: Reflected XSS via unescaped View Transition animation properties |
| GHSA-vj59-8hwv-xxmv | CVE-2026-59731 | HIGH | Astro: Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch |
| GHSA-jrpj-wcv7-9fh9 | CVE-2026-54298 | MODERATE | Astro: XSS via Unescaped Attribute Names in Spread Props |
| GHSA-xr5h-phrj-8vxv | CVE-2026-45028 | LOW | Astro: Server island encrypted parameters vulnerable to cross-component replay |
| GHSA-j687-52p2-xcff | CVE-2026-41067 | MODERATE | Astro: XSS in define:vars via incomplete </script> tag sanitization |
| GHSA-g735-7g2w-hh3f | CVE-2026-33769 | LOW | Astro: Remote allowlist bypass via unanchored matchPathname wildcard |
| GHSA-whqg-ppgf-wp8c | CVE-2025-66202 | MODERATE | Astro has an Authentication Bypass via Double URL Encoding, a bypass for CVE-2025-64765 |
| GHSA-fvmw-cj7j-j39q | CVE-2025-65019 | MODERATE | Astro Cloudflare adapter has Stored Cross-site Scripting vulnerability in /_image endpoint |
| GHSA-ggxq-hp9w-j794 | CVE-2025-64765 | MODERATE | Astro's middleware authentication checks based on url.pathname can be bypassed via url encoded values |
| GHSA-w2vj-39qv-7vh7 | CVE-2025-64745 | LOW | Astro development server error page is vulnerable to reflected Cross-site Scripting |
| GHSA-xf8x-j4p2-f749 | CVE-2025-55303 | MODERATE | Astro allows unauthorized third-party images in _image endpoint |
| GHSA-cq8c-xv66-36gw | CVE-2025-54793 | MODERATE | Astros's duplicate trailing slash feature leads to an open redirection security issue |
| GHSA-49w6-73cw-chjr | CVE-2024-56159 | HIGH | Astro's server source code is exposed to the public if sourcemaps are enabled |
| GHSA-c4pw-33h3-35xw | CVE-2024-56140 | MODERATE | Atro CSRF Middleware Bypass (security.checkOrigin) |
| GHSA-m85w-3h95-hcf9 | CVE-2024-47885 | MODERATE | DOM Clobbering Gadget found in astro's client-side router that leads to XSS |
| GHSA-wrwg-2hg8-v723 | CVE-2025-64764 | HIGH | Astro vulnerable to reflected XSS via the server islands feature |
| GHSA-x3h8-62x9-952g | CVE-2025-64757 | LOW | Astro Development Server has Arbitrary Local File Read |
| GHSA-hr2q-hp5q-x767 | CVE-2025-64525 | MODERATE | Astro vulnerable to URL manipulation via headers, leading to middleware and CVE-2025-61925 bypass |
| GHSA-qcpr-679q-rhm2 | CVE-2025-59837 | HIGH | Astro's bypass of image proxy domain validation leads to SSRF and potential XSS |
| GHSA-5ff5-9fcw-vg88 | CVE-2025-61925 | MODERATE | Astro's `X-Forwarded-Host` is reflected without validation |
GHSA-26w7-cxv4-gfx2 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix GHSA-26w7-cxv4-gfx2
To remediate this vulnerability, upgrade all affected Astro dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install astro@7.2.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls astro
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-26w7-cxv4-gfx2, inspect your project dependencies using npm:
npm ls astro
Analyze the terminal output to locate any version of Astro in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.2.8), your application is affected.
Note: The npm ls astro command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Astro, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-26w7-cxv4-gfx2 Affected Astro Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
astro
|
npm |
< 7.2.8
|
7.2.8
|
References
Frequently Asked Questions
What is GHSA-26w7-cxv4-gfx2?
Which Astro versions are affected?
What version fixes GHSA-26w7-cxv4-gfx2?
Is astro affected?
What is the CVSS score of GHSA-26w7-cxv4-gfx2?
What CWE is associated with GHSA-26w7-cxv4-gfx2?
How can I check npm dependencies for GHSA-26w7-cxv4-gfx2?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-26w7-cxv4-gfx2",
"modified" : "2026-09-08T21:26:16Z",
"published" : "2026-09-08T21:26:16Z",
"aliases" : [ ],
"summary" : "Astro: Remote code execution through AVIF image optimization",
"details" : "A vulnerability in `libheif`, used by the default Sharp image service in Astro, can lead to remote code execution when a malicious AVIF image is optimized.\n\nProjects are affected when an attacker can cause Astro to process an untrusted AVIF image.\n\nThe fix was released in Astro 7.2.8, which requires Sharp 0.35.4.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "astro"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.2.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/strukturag/libheif/security/advisories/GHSA-g89c-p67h-r497"
}, {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/security/advisories/GHSA-26w7-cxv4-gfx2"
}, {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/commit/ecb4082131490b4fe9a56aa44fda84b54ef8967b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/withastro/astro"
}, {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/releases/tag/astro@7.2.8"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125", "CWE-787" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-08T21:26:16Z",
"nvd_published_at" : null
}
}