Monitor vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.8
SAIL Library: Incorrect Pixel Format Handling for XWD Codec
CVE-2026-40492
Summary
A bug in the SAIL library's XWD codec can cause it to access memory incorrectly, potentially leading to crashes or data corruption. This issue was fixed in a recent update, so you should update the library to the latest version to ensure you're protected. If you're using a version of the library that's affected, you should patch it as soon as possible to prevent any potential issues.
Original title
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 resolv...
Original description
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.
nvd CVSS3.1
9.8
Vulnerability type
CWE-787
Out-of-bounds Write
Published: 18 Apr 2026 · Updated: 18 Apr 2026 · First seen: 18 Apr 2026