CVEfocus › CVE database › CVE-2026-40493

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

CVSS 9.8 CriticalEPSS 0.6% (higher than 44% of CVEs)Published 2026-04-18Updated 2026-04-20Assigner: GitHub_M

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.

CWE-787

What to do

Fixed builds are available from Debian: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
2Fix pending
2Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10sailFix pendingUBUNTU-CVE-2026-40493
Ubuntu 26.04sailUnder investigationUBUNTU-CVE-2026-40493
Ubuntu 25.10sailWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-40493
Ubuntu 24.04sailUnder investigationUBUNTU-CVE-2026-40493
Debian 14sailFixed0.9.10-2DEBIAN-CVE-2026-40493
Debian 13sailFix pendingDEBIAN-CVE-2026-40493

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.