SecurityOnlineDo Son
PoC chains libheif flaws to execute code on WordPress servers
Security researchers have publicly disclosed technical details and working proof‑of‑concept exploit code for two critical libheif vulnerabilities, GHSA-x8r2-mggj-j6wr and GHSA-2jg2-4ch7-h545. The PoC chain shows how an authenticated user with media upload permissions can trigger remote code execution on WordPress servers running PHP‑FPM and ImageMagick, by uploading crafted HEIC or AVIF images.
Fortbridge researchers are cited as the authors of the exploit chain, and the PoC has demonstrated remote code execution in lab builds on Ubuntu and Debian, though the article states that no active exploitation in the wild has been confirmed.
The vulnerabilities arise from improper memory bounds validation in libheif’s decoding and item handling paths. GHSA-2jg2-4ch7-h545 comprises 11 out‑of‑bounds read and write flaws affecting derived‑item and pixel‑plane handling, while GHSA-x8r2-mggj-j6wr is a heap‑based buffer overflow in the uncompressed‑codec path for mixed‑interleave YCbCr decoding.
The public PoC describes chaining these flaws to leak heap data from thumbnails, determine library bases, and overwrite a live channel vector to hijack control flow and run OS commands as the www-data user. Affected versions are up to 1.23.1 for GHSA-2jg2-4ch7-h545 and 1.18.0 through 1.23.2 for GHSA-x8r2-mggj-j6wr when built with the uncompressed codec; 1.23.3 and later are not affected. Upgrades to libheif 1.23.3+ are urged, or recompilation without WITH_UNCOMPRESSED_CODEC=ON, with additional guidance to block HEIC/AVIF uploads.