GHSA-26w7-cxv4-gfx2: Astro Remote Code Execution Vulnerability

CRITICAL
CVSS 9.8
CWE-125 CWE-787
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-26w7-cxv4-gfx2
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Astro
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

astro fixed: 7.2.8
npm install astro@7.2.8
Verify Direct and Transitive Dependencies

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

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. Projects are affected when an attacker can cause Astro to process an untrusted AVIF image. The fix was released in Astro 7.2.8, which requires Sharp 0.35.4.

GHSA-26w7-cxv4-gfx2 Affected Astro Versions

1 component(s)
Fixed Versions:
7.2.8
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?
GHSA-26w7-cxv4-gfx2 is a security vulnerability in Astro involving Remote code execution through AVIF image optimization under CWE-125: Out-of-bounds Read.
Which Astro versions are affected?
Affected versions include releases prior to 7.2.8 across affected packages: astro.
What version fixes GHSA-26w7-cxv4-gfx2?
Upgrading to 7.2.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is astro affected?
Yes, astro is affected in releases prior to 7.2.8. Upgrade your dependency to 7.2.8 or later.
What is the CVSS score of GHSA-26w7-cxv4-gfx2?
GHSA-26w7-cxv4-gfx2 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-26w7-cxv4-gfx2?
GHSA-26w7-cxv4-gfx2 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check npm dependencies for GHSA-26w7-cxv4-gfx2?
Run the dependency tree command: 'npm ls astro'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}