Read the docs
TI-2026-29243 Aliases CVE-2026-40492

SAIL has heap buffer overflow in XWD decoder — bits_per_pixel vs pixmap_depth type confusion in byte-swap

Priority HIGH 82CWE-787Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-787 and the CVSS impact.

Summary

SAIL is a cross-platform library for loading and saving images with support for animation, metadata, and ICC profiles. Prior to commit 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02, the XWD codec resolves pixel format based on `pixmap_depth` but the byte-swap code uses `bits_per_pixel` independently. When `pixmap_depth=8` (BPP8_INDEXED, 1 byte/pixel buffer) but `bits_per_pixel=32`, the byte-swap loop accesses memory as `uint32_t*`, reading/writing 4x the allocated buffer size. This is a different vulnerability from the previously reported GHSA-3g38-x2pj-mv55 (CVE-2026-27168), which addressed `bytes_per_line` validation. Commit 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02 contains a patch.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00411 35th percentileScored 2026-11-07
Fix Fixed sail (HappySeaFox): 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
HappySeaFoxsailbefore 36aa5c7ec8a2bb35f6fb867a1177a6f141156b0236aa5c7ec8a2bb35f6fb867a1177a6f141156b02Patch availableCNA
  • sail VendorHappySeaFox Affected before 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02 Fixed in 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02 Patch available CNA

Remediation

  • Fix · CNA sail (HappySeaFox) Fixed in 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-40492

References

  • TI-2026-39458 SAIL: Heap out-of-bounds write in SAIL PSD decoder (Bitmap mode ignores depth) CVSS 3.1CRITICAL 9.8
  • TI-2026-39457 SAIL: Heap out-of-bounds write in SAIL TGA decoder (indexed-RLE bpp/stride mismatch) CVSS 3.1CRITICAL 9.8
  • TI-2026-29245 SAIL has heap buffer overflow in TGA RLE decoder — raw packet path missing bounds check CVSS 3.1CRITICAL 9.8
  • TI-2026-29244 SAIL has heap buffer overflow in PSD decoder — bpp mismatch in LAB 16-bit mode CVSS 3.1CRITICAL 9.8
  • TI-2026-39513 SAIL: XBM X10 decoder writes 2 bytes per literal into a 1-byte-per-literal buffer (heap out-of-bounds write) CVSS 3.1HIGH 7.8
  • TI-2026-81986 Division by zero in SAIL WebP decoder on malformed animated files CVSS 4.0MEDIUM 4.8

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences