GHSA-26w7-cxv4-gfx2: Astro Remote Code Execution Vulnerability
CRITICALGHSA-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.
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
}
}