Astro and Sharp Vulnerability: Remote Code Execution Risk
- Severity
- HIGH
- Affected component
- astro (npm)
- Affected versions
- < 7.2.8 or < 6.4.6 or < 7.2.4 or >= 5.0.0-alpha.0, < 5.0.8 or < 4.16.18 or >= 2.9.0, < 7.1.0 or < 5.14.3 or >= 3.10.0, < 7.0.4 or < 6.3.3 or >= 7.0.0, < 7.0.6 or < 4.16.17 or >= 5.2.0, < 5.12.8 or < 7.0.6 or < 5.15.9 or >= 2.10.10, < 5.18.1 or < 5.15.8 or >= 2.16.0, < 5.15.5 or < 6.1.6 or < 6.4.6 or >= 3.0.0, < 4.16.1 or >= 5.13.4, < 5.13.10 or >= 6.4.7, < 6.4.8 or >= 5.2.0, < 5.15.6 or < 5.15.8 or < 5.15.8 or < 5.14.3 or >= 5.0.0-alpha.0, < 5.13.2 or < 4.16.19 or < 6.1.10
- Patched version
- 7.2.8
An early warning has been issued for a high severity vulnerability in the Astro and Sharp packages. This vulnerability, which is under investigation, could potentially lead to remote code execution when a malicious AVIF image is optimized.
What happened
An early warning has been issued regarding a vulnerability in the libheif library, which is used by the default Sharp image service in Astro. This vulnerability could lead to remote code execution when a malicious AVIF image is optimized. Projects using Astro are reportedly affected if an attacker can cause Astro to process an untrusted AVIF image. The vulnerability is tracked under GHSA-26W7-CXV4-GFX2 and was first flagged on September 8, 2026.
The affected versions of Astro include any version less than 7.2.8, 6.4.6, 7.2.4, 5.0.8, 4.16.18, 7.1.0, 5.14.3, 7.0.4, 6.3.3, 7.0.6, 4.16.17, 5.12.8, 7.0.6, 5.15.9, 5.18.1, 5.15.5, 6.1.6, 6.4.6, 4.16.1, 5.13.10, 6.4.8, 5.15.6, 5.15.8, 5.14.3, 5.13.2, 4.16.19, and 6.1.10. The affected versions of Sharp include any version less than 0.32.6, 0.35.0, 0.30.5, and 0.35.4.
What to do about it
- Upgrade Astro to version 7.2.8 to mitigate the risk of remote code execution.
- Upgrade Sharp to version 0.35.4 to mitigate the risk of remote code execution.
- Monitor the primary sources for updates on the vulnerability and any additional mitigation steps that may be recommended.
How 0Day would have caught this
astro is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.
Frequently asked questions
Am I affected?
You are affected if you are using Astro versions less than 7.2.8, 6.4.6, 7.2.4, 5.0.8, 4.16.18, 7.1.0, 5.14.3, 7.0.4, 6.3.3, 7.0.6, 4.16.17, 5.12.8, 7.0.6, 5.15.9, 5.18.1, 5.15.5, 6.1.6, 6.4.6, 4.16.1, 5.13.10, 6.4.8, 5.15.6, 5.15.8, 5.14.3, 5.13.2, 4.16.19, and 6.1.10, or Sharp versions less than 0.32.6, 0.35.0, 0.30.5, and 0.35.4.
What should I do right now?
Upgrade Astro to version 7.2.8 and Sharp to version 0.35.4 to mitigate the risk of remote code execution. Monitor the primary sources for updates on the vulnerability and any additional mitigation steps that may be recommended.
Has this been exploited in the wild?
There is no confirmed report of this vulnerability being exploited in the wild at this time. The primary sources should be consulted for the latest information.
Sources
- [GHSA-26w7-cxv4-gfx2] Astro: Remote code execution through AVIF image optimization
- [GHSA-2xp9-vwfh-vxw4] Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used
- [GHSA-2xp9-vwfh-vxw4] Next.js: Unauthenticated Remote Code Execution in Image Optimization API when AVIF files are used
- [GHSA-376h-93r7-7g6f] Astro: Authorization bypass from missing path-segment boundary check when stripping the configured base