---
id: CVE-2026-54626
title: >-
  SAIL is a cross-platform library for loading and saving images with support
  for animation, metadata, and ICC profiles
summary: >-
  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-by…
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-122
  - CWE-787
vendor: HappySeaFox
product: sail
affected:
  - sail < 1.0.0
published: '2026-09-17'
updated: '2026-09-24'
sourceUpdated: '2026-09-24T21:25:27.050'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-54626'
references:
  - url: >-
      https://github.com/HappySeaFox/sail/commit/fa24bceb93958ad665dbc3cf6b49a1079ab12559
    label: security-advisories@github.com
  - url: 'https://github.com/HappySeaFox/sail/releases/tag/v1.0.0'
    label: security-advisories@github.com
  - url: >-
      https://github.com/HappySeaFox/sail/security/advisories/GHSA-744p-cqg2-m33h
    label: security-advisories@github.com
  - url: >-
      https://github.com/HappySeaFox/sail/security/advisories/GHSA-744p-cqg2-m33h
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
epss: 0.00775
epssPercentile: 0.53893
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2026-09-17T20:20:49.465542Z'
ingestedAt: '2026-09-17T20:28:02.773Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
