Read the docs
TI-2026-29244 Aliases CVE-2026-40493

SAIL has heap buffer overflow in PSD decoder — bpp mismatch in LAB 16-bit mode

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
No fix listed

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 c930284445ea3ff94451ccd7a57c999eca3bc979, the PSD codec computes bytes-per-pixel (`bpp`) from raw header fields `channels * depth`, but the pixel buffer is allocated based on the resolved pixel format. For LAB mode with `channels=3, depth=16`, `bpp = (3*16+7)/8 = 6`, but the format `BPP40_CIE_LAB` allocates only 5 bytes per pixel. Every pixel write overshoots, causing a deterministic heap buffer overflow on every row. Commit c930284445ea3ff94451ccd7a57c999eca3bc979 contains a patch.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00367 30th percentileScored 2026-11-07
Fix No fix listed No fixed version in the sources yet

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
HappySeaFoxsail< c930284445ea3ff94451ccd7a57c999eca3bc979—No fix listedCNA
  • sail VendorHappySeaFox Affected < c930284445ea3ff94451ccd7a57c999eca3bc979 Fixed in — No fix listed CNA

Remediation

No fixed version listed by the sources yet.

Timeline

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

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-29243 SAIL has heap buffer overflow in XWD decoder — bits_per_pixel vs pixmap_depth type confusion in byte-swap 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