Junglewise Threat Intelligence

Astro remote code execution through AVIF image optimization

Severity: critical · CVSS 9.8 · Published 2026-09-08

Executive brief

Astro is a web framework that automatically optimizes images during the build process. A flaw in the AVIF image optimization library allows attackers to execute malicious code by uploading or injecting a specially crafted image file. If a website processes untrusted user images, attackers could compromise the web server and steal data or deploy ransomware.

Technical details

The vulnerability is a buffer overflow (CWE-125 Out-of-bounds Read, CWE-787 Out-of-bounds Write) in libheif, the underlying library used by Sharp for AVIF image optimization. The flaw exists in Astro's default image service when it attempts to process untrusted AVIF image files. An attacker who can cause Astro to optimize a malicious AVIF image (e.g., via user-uploaded images, externally-sourced content, or build-time content processing) can achieve arbitrary code execution with the privileges of the build or runtime process. No user interaction is required beyond the image being processed. The vulnerability was patched by updating Sharp to version 0.35.4 or later, available in Astro 7.2.8 and later.

Affected products

  • Withastro Astro < 7.2.8

Timeline

  • 2026-08-27: disclosed
  • 2026-08-27: patched: Astro 7.2.8 released

References

Related threats