---
title: "GHSA-26w7-cxv4-gfx2: Astro: Remote code execution through AVIF image optimization"
url: https://erroneo.us/security/ghsa/GHSA-26w7-cxv4-gfx2/
description: "GHSA-26w7-cxv4-gfx2 (critical, npm): Astro: Remote code execution through AVIF image optimization. A vulnerability in libheif, used by the default Sharp…"
type: advisory
section: "Security Digest"
date_published: 2026-09-08
date_modified: 2026-09-08
publisher: erroneo.us
author: erroneo.us Security Desk
ghsa: "GHSA-26w7-cxv4-gfx2"
license: All rights reserved. Quote with attribution and a link.
---

# GHSA-26w7-cxv4-gfx2: Astro: Remote code execution through AVIF image optimization

## Affected packages

- npm `astro` < 7.2.8 → fixed: 7.2.8

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

## Sources

- [GitHub Advisory GHSA-26w7-cxv4-gfx2](https://github.com/advisories/GHSA-26w7-cxv4-gfx2)
- [github.com](https://github.com/strukturag/libheif/security/advisories/GHSA-g89c-p67h-r497)
- [github.com](https://github.com/withastro/astro/security/advisories/GHSA-26w7-cxv4-gfx2)
- [github.com](https://github.com/withastro/astro/commit/ecb4082131490b4fe9a56aa44fda84b54ef8967b)
- [github.com](https://github.com/withastro/astro/releases/tag/astro@7.2.8)

---
Source page: https://erroneo.us/security/ghsa/GHSA-26w7-cxv4-gfx2/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
