Asymmetric Bounds Check Vulnerability in SAIL Image Processing Library
CVE-2026-40494
9.8CRITICAL
What is CVE-2026-40494?
The SAIL image processing library features a vulnerability in its TGA codec's RLE decoder, where an asymmetric bounds check can lead to potential heap buffer overflow. In the affected version, while the run-packet path includes a proper check to prevent writing beyond the buffer space, the raw-packet path lacks such constraints. This oversight can allow an attacker to exploit the vulnerability by writing up to 496 bytes of manipulated data past the buffer's end, potentially leading to arbitrary code execution or denial of service. Adequate measures were taken in commit 45d48d1f2e8e0d73e80bc1fd5310cb57f4547302 to mitigate this risk.
Affected Version(s)
sail < 45d48d1f2e8e0d73e80bc1fd5310cb57f4547302
