Heap-buffer-overflow in libvips: RegionItem::parse
Summary
OSV-2023-328: Heap-buffer-overflow in RegionItem::parse. Affects libvips across 2 version ranges.
>= 3be16bb5c263f4bd03aa00d20fce186adc396e63, < e34cbae4b7162db783d3677ac09112394690ccb1
>= f64ae327c10670f46b46e5d64ff5ff5c07816cdc
Fixed in e34cbae4b7162db783d3677ac09112394690ccb1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
libvips is an open-source image processing library that provides a wide range of functionality for manipulating images. It is commonly used in various applications and frameworks to perform tasks such as resizing, cropping, and converting images. However, a vulnerability has been discovered in libvips that could potentially lead to a heap-buffer-overflow.
Vulnerability Detail
The vulnerability in libvips, specifically in the RegionItem::parse function, allows for a heap-buffer-overflow read. This can result in a crash when parsing certain heif files. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition. The vulnerability was reported through the OSS-Fuzz project and has been assigned a medium severity rating.
How To Fix
Minimum fixed version
e34cbae4b7162db783d3677ac09112394690ccb1
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid parsing heif files using libvips until the vulnerability is fixed. This can be achieved by filtering out heif files or using an alternative image format.
Conclusion
In conclusion, libvips is vulnerable to a heap-buffer-overflow in the RegionItem::parse function. Users should update to a fixed version of libvips to mitigate the risk. As a temporary workaround, users can avoid parsing heif files using libvips. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for libvips →
FAQ
libvips is an open-source image processing library used for manipulating images in various applications and frameworks.
A heap-buffer-overflow is a type of memory vulnerability where data is written or read outside the bounds of a buffer allocated on the heap.
An attacker could exploit this vulnerability by providing a specially crafted heif file that triggers the heap-buffer-overflow read, potentially leading to arbitrary code execution or a denial-of-service condition.
Yes, the vulnerability has been fixed in libvips. Users are advised to update to a version that includes the fix.
This vulnerability has been assigned a medium severity rating.
References
Related vulnerabilities
Recent vulnerabilities recorded for libvips.