CVE-2026-40492SAIL has heap buffer overflow in XWD decoder — bits_per_pixel vs pixmap_depth type…
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | sail | Fix pending | UBUNTU-CVE-2026-40492 | |
| Ubuntu 26.04 | sail | Fix pending | UBUNTU-CVE-2026-40492 | |
| Ubuntu 25.10 | sail | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-40492 | |
| Ubuntu 24.04 | sail | Not affected vulnerable_code_not_present | ||
| Debian 14 | sail | Fixed | 0.9.10-2 | DEBIAN-CVE-2026-40492 |
| Debian 13 | sail | Fix pending | DEBIAN-CVE-2026-40492 |
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.
- HappySeaFox sail: affected: < 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02
References
- https://github.com/HappySeaFox/sail/security/advisories/GHSA-526v-vm72-4v64
- https://github.com/HappySeaFox/sail/commit/36aa5c7ec8a2bb35f6fb867a1177a6f141156b02
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.