CVE-2026-40494: SAIL has heap buffer overflow in TGA RLE decoder — raw packet path missing bounds check

Published Apr 18, 2026
·
Updated

SAIL is a cross-platform library for loading and saving images with support for animation, metadata, and ICC profiles. Prior to commit 45d48d1f2e8e0d73e80bc1fd5310cb57f4547302, the TGA codec's RLE decoder in tga.c has an asymmetric bounds check vulnerability. The run-packet path (line 297) correctly clamps the repeat count to the remaining buffer space, but the raw-packet path (line 305-311) has no equivalent bounds check. This allows writing up to 496 bytes of attacker-controlled data past the end of a heap buffer. Commit 45d48d1f2e8e0d73e80bc1fd5310cb57f4547302 patches the issue.

Affected Software

1 affected component
SAIL SAIL<45d48d1f2e8e0d73e80bc1fd5310cb57f4547302

Event History

Apr 18, 2026
CVE Published
via MITRE·01:42 AM
Data Sourced
via MITRE·01:42 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2026-40494?

CVE-2026-40494 has been classified with a high severity due to a heap buffer overflow vulnerability.

2

How do I fix CVE-2026-40494?

To mitigate CVE-2026-40494, update SAIL to a version beyond commit 45d48d1f2e8e0d73e80bc1fd5310cb57f4547302.

3

What types of exploits are possible with CVE-2026-40494?

CVE-2026-40494 may lead to remote code execution or denial of service if exploited.

4

Which software versions are affected by CVE-2026-40494?

Software versions of SAIL prior to commit 45d48d1f2e8e0d73e80bc1fd5310cb57f4547302 are affected by CVE-2026-40494.

5

What components of SAIL are impacted by CVE-2026-40494?

CVE-2026-40494 impacts the TGA codec's RLE decoder in the SAIL library.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203