Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconDeliver malicious TGA file
-
DeliveryApplication invokes SAIL TGA decoder
-
ExploitParser allocates undersized heap buffer
-
InstallRLE raw-packet handler writes 496 bytes past buffer
-
C2Overwrite heap metadata/function pointers
-
ExecuteRedirect execution to attacker payload
-
ImpactExecute arbitrary code in application context
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the target application to invoke SAIL's TGA decoding functionality on attacker-supplied file data. Vulnerable code path is triggered when processing TGA files with RLE compression (image type 9, 10, or 11 in TGA header) containing raw-packet sequences. No user interaction required if the application automatically processes uploaded files (CVSS UI:N). No authentication required for network-accessible upload endpoints (CVSS PR:N). Vulnerability affects default SAIL builds with TGA codec enabled-no special compilation flags or non-default configuration needed. Exploitation is limited to scenarios where untrusted TGA files reach the decoder; applications that restrict image processing to trusted sources or validated formats (JPEG/PNG only) are not exposed despite using vulnerable SAIL versions. Attack succeeds against both little-endian and big-endian platforms as TGA format parsing is endian-aware. |
| Impact | CVSS 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) reflects accurate real-world risk for applications parsing untrusted TGA files from network sources-web servers processing user uploads, email attachment handlers, or document conversion services. Attack complexity is genuinely low: crafting malformed RLE packets requires only basic understanding of TGA format specification. No EPSS score provided, but exploitation likelihood is high given: (1) complete technical disclosure in GitHub advisory with exact vulnerable lines, (2) deterministic 496-byte overrun simplifies exploit development compared to variable-length overflows, (3) heap corruption with attacker-controlled data enables reliable code execution on modern platforms via heap spray or metadata overwrite techniques. Absence from CISA KEV and no identified POC suggests targeted rather than mass exploitation to date. SSVC decision factors: exploitation status unproven, technical impact total (RCE), automatable via malicious file hosting. Priority depends on deployment context-critical for internet-facing image processors, lower for sandboxed desktop applications with user confirmation dialogs. Key uncertainty: prevalence of SAIL library in production environments not documented in available references. |
| Exploit ScenarioDerived | Attacker hosts a specially crafted TGA file on a web server or embeds it in a document. When a victim application using SAIL processes this file (via user upload to a web application, email attachment preview, or automated document conversion pipeline), the TGA decoder allocates a heap buffer based on image dimensions. The malicious file contains RLE raw-packet sequences designed to write 496 bytes past this buffer, overwriting adjacent heap metadata or function pointers. Attacker gains arbitrary code execution in the context of the processing application, potentially escalating to full system compromise if the service runs with elevated privileges. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Apr 18, 2026
Heap buffer overflow in SAIL image library's TGA decoder allows remote code execution via malformed RLE-compressed TGA files against all versions prior to commit 45d48d1. Network-accessible applications processing untrusted TGA images can be fully compromised without authentication or user interaction (CVSS 9.8). The raw-packet RLE decompression path permits writing up to 496 bytes of attacker-controlled data beyond allocated heap bounds. Vendor patch confirmed via GitHub commit 45d48d1f2e8e0d73e80bc1fd5310cb57f4547302. No CISA KEV listing or public POC identified at time of analysis, but the straightforward exploitation conditions (parsing untrusted files) and complete technical disclosure create high weaponization risk.
Earlier versions of this analysis (1)
Heap buffer overflow in SAIL image library's TGA decoder allows remote code execution via maliciously crafted TGA files. The vulnerability affects the raw-packet path of the RLE decoder in tga.c, which fails to validate buffer boundaries before writing up to 496 bytes of attacker-controlled data. CVSS 9.8 (critical) with network attack vector and no authentication required. EPSS data unavailable, not listed in CISA KEV. Upstream fix available in commit 45d48d1f2e8e0d73e80bc1fd5310cb57f4547302, but released patched version not independently confirmed.
RemediationAI
Update SAIL library to commit 45d48d1f2e8e0d73e80bc1fd5310cb57f4547302 or any subsequent release incorporating this fix (https://github.com/HappySeaFox/sail/commit/45d48d1f2e8e0d73e80bc1fd5310cb57f4547302). Rebuild all dependent applications against patched library version. For environments unable to immediately upgrade, implement defense-in-depth controls: disable TGA format support entirely if not business-critical (eliminates attack surface), enforce strict file type validation before passing to SAIL (reject files with TGA magic bytes 0x00 at offset 0-1), deploy image processing in isolated sandboxes with limited heap executable memory (containers, seccomp filters, or pledged processes reduce RCE impact to denial-of-service). Note that disabling TGA support breaks legitimate TGA file workflows; file type filtering can be bypassed via polyglot files; sandboxing adds operational complexity and may degrade performance for batch processing. Workarounds are interim mitigations only-vendor patch remains the complete remediation.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SAIL (cpe:2.3:a:happyseafox:sail) is a cross-platform image codec library supporting format conversion, animation, metadata, and ICC profiles. The vulnerability resides in the TGA (Targa) format codec's run-length encoding (RLE) decompression routine in tga.c. TGA RLE uses two packet types: run-length packets (repeating pixel data) and raw packets (literal pixel data). The decoder correctly bounds-checks run-length packets at line 297 by clamping repeat counts to remaining buffer space, but the raw-packet handler (lines 305-311) lacks equivalent validation. This asymmetric validation creates a classic CWE-787 out-of-bounds write condition where raw-packet sequences can write attacker-controlled pixel data up to 496 bytes past the heap allocation boundary. The 496-byte overrun limit derives from TGA packet structure (maximum 128 pixels per packet × variable bytes-per-pixel), making this a deterministic overflow rather than unbounded corruption.
Know when Sail gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (GitHub_M) · only source for this CVE.
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
4DescriptionCVE.org
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.
Executive ViewAI
SAIL image library versions prior to commit 45d48d1 contain a critical heap buffer overflow in the TGA decoder that enables unauthenticated remote code execution when processing malformed image files. Any organization using SAIL to process untrusted TGA images-including web applications, image processing services, and document management systems-faces immediate risk of full system compromise without requiring user authentication or interaction.
Apply vendor patch. Interim mitigations pending patch deployment: disable TGA file parsing in SAIL-dependent applications; implement network-level file-type filtering to reject TGA uploads; restrict file processing to authenticated, internal users only; run vulnerable services in sandboxed or isolated environments with minimal privileges.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Related Vulnerabilities in SAIL Image Library Buffer Overflow
View all 3The SAIL image library contains a heap buffer overflow in its XWD file parser that fails to validate the bytes_per_line
Denial of service in SAIL 1.0.1 and earlier: the built-in WebP decoder performs a divide-by-zero during loader initializ
A memory corruption vulnerability exists in the PSD Image Decoding functionality of the SAIL Image Decoding Library v0.9
A memory corruption vulnerability exists in the PSD RLE Decoding functionality of the SAIL Image Decoding Library v0.9.8
A memory corruption vulnerability exists in the BMPv3 RLE Decoding functionality of the SAIL Image Decoding Library v0.9
A memory corruption vulnerability exists in the WebP Image Decoding functionality of the SAIL Image Decoding Library v0.
A memory corruption vulnerability exists in the PCX Image Decoding functionality of the SAIL Image Decoding Library v0.9
A memory corruption vulnerability exists in the BMPv3 Palette Decoding functionality of the SAIL Image Decoding Library
A memory corruption vulnerability exists in the PCX Image Decoding functionality of the SAIL Image Decoding Library v0.9
A memory corruption vulnerability exists in the BMPv3 Image Decoding functionality of the SAIL Image Decoding Library v0
EUVD-2026-23648
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB