Description
SAIL is a cross-platform library for loading and saving images with support for animation, metadata, and ICC profiles. In 0.9.10 and earlier, the TGA_INDEXED_RLE path selected by image_type == 9 allocates an image buffer using the one-byte-per-pixel SAIL_PIXEL_FORMAT_BPP8_INDEXED format returned by tga_private_sail_pixel_format() in src/sail-codecs/tga/helpers.c, while sail_codec_load_frame_v8_tga() in src/sail-codecs/tga/tga.c derives a two-to-four-byte pixel_size from an attacker-controlled header bpp value from 9 through 32. Loading a crafted color-mapped run-length-encoded TGA through sail_load_from_file() or sail_load_from_memory() therefore writes attacker-controlled bytes beyond the heap pixel buffer. The pixel-count clamp added for CVE-2026-40494 does not constrain the per-pixel write width, so this issue is an incomplete fix of that vulnerability and can cause heap corruption, a reliable crash, or potential code execution. This issue is fixed in version 1.0.0.
Published: 2026-09-17
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Heap out-of-bounds write allowing potential code execution
Action: Immediate Patch
AI Analysis

Impact

SAIL is a cross‑platform image library whose TGA_INDEXED_RLE decoder erroneously calculates the pixel buffer size. In versions 0.9.10 and earlier, the decoder reserves a one‑byte per pixel buffer for indexed images but then writes each pixel using a size derived from an attacker‑controlled bpp value between 9 and 32. This leads to a heap out‑of‑bounds write. The flaw can corrupt heap structures, cause a crash, or enable arbitrary code execution.

Affected Systems

The affected product is the HappySeaFox Sail image library. All releases up to and including version 0.9.10 are vulnerable. The vulnerability was fixed in release 1.0.0, which can be downloaded from the GitHub releases page.

Risk and Exploitability

The CVSS score of 9.8 indicates critical severity. EPSS is below 1 %, suggesting a low current exploitation probability, and the vulnerability is not listed in CISA KEV. However, since the flaw permits arbitrary code execution when an attacker supplies a crafted TGA file to sail_load_from_file or sail_load_from_memory, the effective risk to systems that process untrusted image data is significant. The likely attack vector is a local or remote execution of a malicious TGA image, exploiting the mismatch between the indexed‑RLE pixel size calculation and the actual pixel buffer.

Generated by OpenCVE AI on September 19, 2026 at 02:22 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Sail library to version 1.0.0 or later, which resolves the pixel size mismatch and removes the out‑of‑bounds write.
  • If an update is not immediately feasible, eliminate the possibility of loading indexed‑RLE TGA files from untrusted sources by disabling that image type in the application or rejecting the format at the caller level.
  • Run applications that use Sail in a sandbox or with restricted privileges to limit the damage of potential heap corruption or code execution until the library can be upgraded.

Generated by OpenCVE AI on September 19, 2026 at 02:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 18 Sep 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 18 Sep 2026 13:00:00 +0000

Type Values Removed Values Added
First Time appeared Happyseafox
Happyseafox sail
Vendors & Products Happyseafox
Happyseafox sail

Thu, 17 Sep 2026 20:00:00 +0000

Type Values Removed Values Added
Description SAIL is a cross-platform library for loading and saving images with support for animation, metadata, and ICC profiles. In 0.9.10 and earlier, the TGA_INDEXED_RLE path selected by image_type == 9 allocates an image buffer using the one-byte-per-pixel SAIL_PIXEL_FORMAT_BPP8_INDEXED format returned by tga_private_sail_pixel_format() in src/sail-codecs/tga/helpers.c, while sail_codec_load_frame_v8_tga() in src/sail-codecs/tga/tga.c derives a two-to-four-byte pixel_size from an attacker-controlled header bpp value from 9 through 32. Loading a crafted color-mapped run-length-encoded TGA through sail_load_from_file() or sail_load_from_memory() therefore writes attacker-controlled bytes beyond the heap pixel buffer. The pixel-count clamp added for CVE-2026-40494 does not constrain the per-pixel write width, so this issue is an incomplete fix of that vulnerability and can cause heap corruption, a reliable crash, or potential code execution. This issue is fixed in version 1.0.0.
Title SAIL: Heap out-of-bounds write in SAIL TGA decoder (indexed-RLE bpp/stride mismatch)
Weaknesses CWE-122
CWE-787
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Happyseafox Sail
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-17T20:21:11.085Z

Reserved: 2026-06-15T20:07:02.185Z

Link: CVE-2026-54626

cve-icon Vulnrichment

Updated: 2026-09-17T20:21:06.111Z

cve-icon NVD

Status : Deferred

Published: 2026-09-17T20:16:51.970

Modified: 2026-09-24T21:25:27.050

Link: CVE-2026-54626

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-19T02:30:17Z

Weaknesses