# CVE-2026-54627: SAIL image library heap buffer overflow in PSD bitmap mode

Source: https://junglewise.ai/threats/cve-2026-54627-sail-image-library-heap-buffer-overflow-in-psd-bitmap-mode  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-17. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-54627 · Severity: critical · CVSS 9.8 · Published 2026-09-17

SAIL is a cross-platform library that loads and saves image files including support for animation and metadata. A vulnerability in PSD (Photoshop) file parsing allows an attacker to craft a malicious PSD file that, when loaded by an application using SAIL, causes a heap buffer overflow due to a mismatch between the declared image color mode and bit depth. This can lead to application crashes or potentially arbitrary code execution.

Technologies: [HappySeaFox SAIL](https://junglewise.ai/threats/technologies/sail). Vendors: [HappySeaFox](https://junglewise.ai/threats/vendors/happyseafox).

## Quick answers

**Is CVE-2026-54627 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-54627 being exploited in the wild.

**How severe is CVE-2026-54627?** Critical severity, with a CVSS score of 9.8, published 17 September 2026.

**Which products and versions are affected?** HappySeaFox SAIL 0.9.10 and earlier.

**Is there a fix for CVE-2026-54627?** A patch was published on 2026-06-19: Version 1.0.0 released on June 19, 2026 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-54627 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-54627?** Check whether you run HappySeaFox SAIL at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability exists in SAIL 0.9.10 and earlier in the PSD codec. The function psd_private_sail_pixel_format() incorrectly resolves a one-channel PSD in Bitmap color mode to SAIL_PIXEL_FORMAT_BPP1_INDEXED without validating that the file depth matches the expected one-bit-per-pixel format. Meanwhile, sail_codec_load_frame_v8_psd() accepts depth == 8, causing it to write one byte per pixel into a buffer sized for one-bit rows. This mode/depth mismatch leads to out-of-bounds heap writes. The vulnerability is triggered via the public APIs sail_load_from_file() or sail_load_from_memory() when processing a crafted PSD file; no authentication is required and the attack vector is the file itself. The flaw results in heap memory corruption, reliable denial of service, or potential code execution. The issue is resolved in version 1.0.0.

## Affected products

- HappySeaFox SAIL 0.9.10 and earlier

## Timeline

- 2026-09-17: disclosed
- 2026-06-19: patched: Version 1.0.0 released on June 19, 2026

## References

- [https://github.com/HappySeaFox/sail/commit/f44a8b779a1fc527fc6bc5caa71a66a8ed940d50](https://github.com/HappySeaFox/sail/commit/f44a8b779a1fc527fc6bc5caa71a66a8ed940d50)
- [https://github.com/HappySeaFox/sail/releases/tag/v1.0.0](https://github.com/HappySeaFox/sail/releases/tag/v1.0.0)

## Related threats

- [SAIL WebP decoder divide-by-zero in canvas metadata handling](https://junglewise.ai/threats/cve-2026-59959-sail-is-a-cross-platform-library-for-loading-and-saving-images)
- [SAIL library heap overflow in XBM decoder](https://junglewise.ai/threats/cve-2026-54692-sail-library-heap-overflow-in-xbm-decoder)
- [SAIL heap buffer overflow in TGA decoder](https://junglewise.ai/threats/cve-2026-54626-sail-heap-buffer-overflow-in-tga-decoder)
