Skip to content

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

CriticalCVSS 9.8 EPSS 0.37%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: yes · technical impact: total
Technology
UbuntuDebian

Description

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.

Upgrade path

6 packages: 1 fixed, 4 with no fix yet.

PackageAffectedFixed inStatus
debian/sail(Debian 13) = 0.9.8-1; = 0.9.8-1+deb13u1; = 0.9.9-1; = 0.9.10-1 +4 more No fix listed No fix yet
ubuntu/sail(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/sail(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/sail(Ubuntu 26.10) All versions No fix listed No fix yet
debian/sail(Debian 14) < 0.9.10-2; = 0.9.8-1; = 0.9.9-1; = 0.9.10-1 0.9.10-2 Fixed
HappySeaFox sail = < c930284445ea3ff94451ccd7a57c999eca3bc979 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
HappySeaFox sail = < c930284445ea3ff94451ccd7a57c999eca3bc979 No fix listed
debian/sail(Debian:13) All versions No fix listed
debian/sail(Debian:13) = 0.9.10-1 No fix listed
debian/sail(Debian:13) = 0.9.10-2 No fix listed
debian/sail(Debian:13) = 0.9.10-3 No fix listed
debian/sail(Debian:13) = 0.9.8-1 No fix listed
debian/sail(Debian:13) = 0.9.8-1+deb13u1 No fix listed
debian/sail(Debian:13) = 0.9.9-1 No fix listed
debian/sail(Debian:13) = 1.2.0-1 No fix listed
debian/sail(Debian:14) < 0.9.10-2 0.9.10-2
debian/sail(Debian:14) = 0.9.10-1 No fix listed
debian/sail(Debian:14) = 0.9.8-1 No fix listed
debian/sail(Debian:14) = 0.9.9-1 No fix listed
ubuntu/sail(Ubuntu:24.04) All versions No fix listed
ubuntu/sail(Ubuntu:26.04) All versions No fix listed
ubuntu/sail(Ubuntu:26.10) All versions No fix listed

References