
Two critical vulnerabilities in its server application, which could allow remote attackers to obtain unauthorized information or cause a denial of service upon uploading a maliciously crafted JPEG, have been discovered and patched by Facebook.
These vulnerabilities were discovered in HHVM (Virtual HipHop Machine) – a high-performance, open-source developed by Facebook to run programs written in the PHP and Hack programming languages.
Since the affected HHVM server application is open source and free, both issues may also affect other websites that use HHVM, including Wikipedia, Box, and especially those that allow their users to upload images to the server.
Both vulnerabilities are due to a potential "memory overflow" in HHVM's GD extension, when an attacker inserts a specially crafted JPEG image, which allows a malicious program to read data outside of memory.
CVE-2019-11925: Insufficient bounds checking issues exist when processing the JPEG APP12 block marker in the GD extension, allowing potential attackers to access out-of-bounds memory via malicious creation of invalid JPEG input.
CVE-2019-11926: Insufficient bounds checking issues exist when processing M_SOFx markers from JPEG headers in the GD extension, allowing potential attackers to access out-of-bounds memory via malicious creation of invalid JPEG input.
Both vulnerabilities affect all supported HHVM versions before 3.30.9, all versions between 4.0.0 and 4.8.3, all versions between 4.9.0 and 4.15.2, and versions 4.16.0 to 4.16.3, 4.17 .0 to 4.17.2, 4.18.0 to 4.18.1, 4.19.0, 4.20.0 to 4.20.1.
The HHVM team addressed the vulnerabilities with the release of HHVM versions 4.21.0, 4.20.2, 4.19.1, 4.18.2, 4.17.3, 4.16.4, 4.15.3, 4.8.4, and 3.30.10.
If your website or server also uses HHVM, it is recommended that you update it to the latest version of the software immediately.
