Global Buffer Overflow in ffjpeg jfif_encode
A global buffer overflow exists in the jfif_encode function at jfif.c:701 in ffjpeg through 2020-06-22. This vulnerability can be triggered by processing a specially crafted JPEG file, leading to memory corruption.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can result in a denial of service (DoS) due to process crash. Depending on the context and usage, there is potential for further exploitation such as arbitrary code execution, though the primary impact described is DoS.
If you can’t patch tonight, do this now.
Avoid processing untrusted JPEG files with ffjpeg. Employ runtime protections such as ASLR and stack canaries to reduce exploitability. Use file type validation and sandboxing where possible.
Patch, then assume compromise.
Upgrade ffjpeg to a version after 2020-06-22 that contains a fix for the buffer overflow in jfif_encode. If no official patch is available, consider applying a patch to bounds-check the affected buffer in jfif_encode.
No public exploits tracked yet. Mallory keeps watching.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
1 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.