CVE-2026-54627

SAIL: Heap out-of-bounds write in SAIL PSD decoder (Bitmap mode ignores depth)

Published Sep 17, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
SAIL is a cross-platform library for loading and saving images with support for animation, metadata, and ICC profiles. In 0.9.10 and earlier, psd_private_sail_pixel_format() in src/sail-codecs/psd/helpers.c resolves a one-channel PSD in Bitmap color mode to SAIL_PIXEL_FORMAT_BPP1_INDEXED without requiring the file depth to be one, so the pixel buffer uses one-bit rows while sail_codec_load_frame_v8_psd() in src/sail-codecs/psd/psd.c accepts depth == 8 and writes one attacker-controlled byte per pixel. Loading a crafted PSD through sail_load_from_file() or sail_load_from_memory() therefore writes beyond each heap row, causing memory corruption, a reliable crash, or potential code execution. This mode/depth mismatch is distinct from GHSA-rcqx-gc76-r9mv and GHSA-wcj8-hxxf-pq2c. This issue is fixed in version 1.0.0.

Analysis

AI-generated

Technical impact

The SAIL image library contains a heap out‑of‑bounds write in its PSD decoder. When a one‑channel Bitmap PSD declares a depth of 8 bits the helper function resolves the image to one‑bit rows, yet the main decoder accepts the depth value and writes one byte per pixel. This mismatch allows maliciously crafted PSD files to corrupt the heap, reliably crash the application or, in worst cases, lead to arbitrary code execution.

Affected Systems

The flaw was found in HappySeaFox SAIL versions 0.9.10 and earlier. The update that corrects the depth handling, released as v1.0.0, is available in the GitHub repository. All code paths that load PSD files via sail_load_from_file() or sail_load_from_memory() are affected, regardless of platform, because SAIL is a cross‑platform library.

Risk and Exploitability

With a CVSS score of 9.8 the vulnerability is rated critical. The EPSS probability is reported as below 1 %, and the issue is not currently listed in CISA’s KEV catalog, but the high base score and the potential for code execution still warrant attention. The attack requires an application that uses SAIL to load a crafted PSD file, so an attacker could supply such a file to a vulnerable service or supply chain. Applying the v1.0.0 fix or otherwise preventing the decoder from processing malicious images mitigates the risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to SAIL v1.0.0 or newer, which corrects the depth handling and removes the out‑of‑bounds write.
  • If an upgrade is not immediately possible, validate PSD input before decoding: reject Bitmap mode files that declare a depth of 8 bits, or sandbox the decoding operation in a hardened process that has ASLR, stack canaries and memory‑protection enabled.
  • Monitor for abnormal crashes or memory corruption in applications that use SAIL, and deploy runtime defenses such as Address Space Layout Randomization and executable‑memory protection to reduce the impact of any remaining vulnerabilities.

Generated by OpenCVE AI on September 19, 2026 at 01:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Happyseafox
Happyseafox sail
Vendors & Products Happyseafox
Happyseafox sail
Type Values Removed Values Added
Description SAIL is a cross-platform library for loading and saving images with support for animation, metadata, and ICC profiles. In 0.9.10 and earlier, psd_private_sail_pixel_format() in src/sail-codecs/psd/helpers.c resolves a one-channel PSD in Bitmap color mode to SAIL_PIXEL_FORMAT_BPP1_INDEXED without requiring the file depth to be one, so the pixel buffer uses one-bit rows while sail_codec_load_frame_v8_psd() in src/sail-codecs/psd/psd.c accepts depth == 8 and writes one attacker-controlled byte per pixel. Loading a crafted PSD through sail_load_from_file() or sail_load_from_memory() therefore writes beyond each heap row, causing memory corruption, a reliable crash, or potential code execution. This mode/depth mismatch is distinct from GHSA-rcqx-gc76-r9mv and GHSA-wcj8-hxxf-pq2c. This issue is fixed in version 1.0.0.
Title SAIL: Heap out-of-bounds write in SAIL PSD decoder (Bitmap mode ignores depth)
Weaknesses CWE-122
CWE-787
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 18, 2026, 8:10 PM
Reserved
Jun 15, 2026, 8:07 PM
Status
Awaiting Analysis
Published
Sep 17, 2026, 8:16 PM
Modified
Sep 23, 2026, 6:12 PM