First published: Fri Oct 20 2023(Updated: )
stb_image is a single file MIT licensed library for processing images. When `stbi_set_flip_vertically_on_load` is set to `TRUE` and `req_comp` is set to a number that doesn’t match the real number of components per pixel, the library attempts to flip the image vertically. A crafted image file can trigger `memcpy` out-of-bounds read because `bytes_per_pixel` used to calculate `bytes_per_row` doesn’t match the real image array dimensions.
Credit: security-advisories@github.com security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
Nothings Stb Image.h | =2.28 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The vulnerability ID for this issue is CVE-2023-45662.
The severity rating for CVE-2023-45662 is high with a score of 8.1.
The affected software is Nothings Stb Image.h version 2.28.
CVE-2023-45662 occurs when the stbi_set_flip_vertically_on_load function is set to TRUE and req_comp is set to a number that doesn't match the real number of components per pixel.
CVE-2023-45662 can be exploited by using a crafted image file that triggers a multi-byte read heap buffer overflow in the stbi__vertical_flip function of stb_image library.