Heap Buffer Overflow in Image Loading Library Affecting SAIL
CVE-2026-40493
9.8CRITICAL
What is CVE-2026-40493?
The SAIL library, utilized for efficient image loading and saving, is susceptible to a heap buffer overflow due to a mismatch in pixel buffer allocation. In scenarios involving LAB mode images with a specific channel and depth configuration, the calculated bytes-per-pixel does not align with the allocation size, leading to overshooting writes. This vulnerability can permanently affect memory, granting unauthorized access or causing crashes. A patch has been made available in commit c930284445ea3ff94451ccd7a57c999eca3bc979 to rectify this issue.
Affected Version(s)
sail < c930284445ea3ff94451ccd7a57c999eca3bc979
