Reproducing, disclosing, and fixing the libheif vulnerability with Hacktron and the maintainers
A remote code execution flaw in libheif, an AVIF image decoder, was disclosed and fixed through coordinated efforts by Hacktron, Vercel, Next.js, and upstream maintainers in August 2026.
In August 2026, security firm Hacktron identified what appeared to be a remote code execution vulnerability in Next.js image optimization. Further investigation revealed the flaw originated in libheif, an AVIF image decoder used by multiple projects including Next.js, ImageMagick, and WordPress. Hacktron promptly notified Vercel, which worked with the researchers to reproduce the issue and assess its impact across the dependency chain.
Vercel deployed a platform-wide mitigation by disabling AVIF optimization in its Image Optimization Service, preventing malicious AVIF images from reaching libheif via sharp and libvips. While this stopped exploitation on Vercel, the company coordinated with maintainers of sharp, libvips, and libheif to address the root cause, ensuring a permanent fix rather than relying solely on mitigation.
On August 19, Next.js and libvips maintainers aligned on remediation steps, followed by coordination with sharp and libheif. Hacktron submitted vulnerability details to libheif via a GitHub Security Advisory, accelerating the fix process. By August 25, libheif released version 1.23.2, which remediated the remote code execution vulnerability.
Next.js published a security release on August 25 that disabled AVIF optimization and resizing, bundled with another planned fix. Vercel’s proactive mitigation and collaboration with maintainers ensured customers using Vercel’s Image Optimization Service were protected immediately, while self-hosted applications received the fix through the Next.js release.