Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft LAB-mode PSD file
-
DeliveryDeliver to SAIL-using application
-
ExploitTrigger PSD decode
-
InstallBuffer overflow on pixel write
-
C2Corrupt heap metadata
-
ExecuteOverwrite code pointer
-
ImpactExecute arbitrary code
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires target application to use SAIL library for image processing AND process untrusted PSD files via SAIL's PSD codec. Specifically requires a PSD file with LAB colorspace (colormode field = 9), 3 channels, and 16-bit depth to trigger the allocation mismatch. Default SAIL configurations include PSD codec support, making all installations vulnerable if they handle PSD files. No authentication required (CVSS PR:N) - attacker needs only the ability to supply a PSD file to the target application. No user interaction required (UI:N) if the application auto-processes images (e.g., server-side thumbnail generation, automated document workflows). Exploitation IS limited by deployment context: applications that do not process PSD files, or process only trusted/internal PSD files, or disable SAIL's PSD codec are not exposed despite running vulnerable SAIL versions. |
| Impact | CVSS 9.8 (Critical) reflects maximum exploitability: network-accessible attack vector, low complexity, no authentication or user interaction required, and complete compromise of confidentiality, integrity, and availability. However, real-world risk depends heavily on deployment context. SAIL is a library - exploitation requires an application that processes untrusted PSD files using the affected SAIL codec. The deterministic nature of the overflow (occurs on every pixel of every row in LAB-mode PSDs) increases exploit reliability but also makes detection straightforward. No EPSS score available to assess actual exploitation likelihood. Not present in CISA KEV, indicating no confirmed active exploitation campaigns. GitHub security advisory confirms the issue but no public POC is referenced. SSVC assessment: exploitation status unknown, likely automatable given deterministic overflow, technical impact is total system compromise if exploited in a privileged service. Priority depends on whether defenders use SAIL in attack-surface-exposed applications (web servers processing user uploads, email attachment parsers, etc.) versus internal tools. The obscurity of LAB-mode PSD files may reduce attacker interest compared to common formats. |
| Exploit ScenarioDerived | Attacker crafts a malicious PSD file with LAB colorspace (colormode=9), 3 channels, and 16-bit depth. When a victim application using SAIL processes this file (e.g., web service generating thumbnails from user uploads, document converter, image gallery software), the PSD decoder allocates a 5-byte-per-pixel buffer but writes 6 bytes per pixel. The deterministic one-byte overflow on every pixel across every row corrupts heap metadata. Attacker controls overflow content via pixel data, enabling heap manipulation to overwrite function pointers or vtable entries, achieving arbitrary code execution with the privileges of the processing application. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Apr 18, 2026
Heap buffer overflow in SAIL PSD codec allows remote code execution when processing malicious LAB-mode PSD files. Affects all SAIL versions prior to commit c930284 (HappySeaFox/sail). Attackers can achieve arbitrary code execution (CVSS 9.8: AV:N/AC:L/PR:N/UI:N) by triggering a mismatch between computed bytes-per-pixel (6 bytes for 3-channel 16-bit LAB) and allocated buffer size (5 bytes for BPP40_CIE_LAB format). Every pixel write deterministically overflows the heap buffer. EPSS data not available. Not listed in CISA KEV. Patch available via GitHub commit c930284445ea3ff94451ccd7a57c999eca3bc979.
Earlier versions of this analysis (1)
Heap buffer overflow in SAIL image library PSD codec allows remote unauthenticated attackers to execute arbitrary code via malformed Photoshop files. The vulnerability affects all SAIL versions prior to commit c930284 and triggers automatically when processing LAB color mode PSD files with 16-bit depth - no user interaction required beyond opening the file. CVSS 9.8 (Critical) with network attack vector, though exploitation requires victim to process attacker-supplied PSD file. No active exploitation confirmed (not in CISA KEV), but deterministic triggering and heap corruption primitive suggest high weaponization potential. EPSS data not provided.
RemediationAI
Update SAIL to commit c930284445ea3ff94451ccd7a57c999eca3bc979 or later, available at https://github.com/HappySeaFox/sail/commit/c930284445ea3ff94451ccd7a57c999eca3bc979. The patch corrects the bytes-per-pixel calculation to align with actual allocated buffer sizes for LAB-mode pixel formats. If immediate patching is not feasible, disable PSD format support in SAIL configuration to eliminate the attack surface - this breaks PSD file processing but prevents exploitation. Alternatively, implement strict input validation to reject PSD files with LAB colorspace (check colormode field in PSD header equals 9) before passing to SAIL - this blocks only the vulnerable path while preserving RGB/CMYK PSD support, but requires application-layer changes and understanding of PSD structure. For network-facing services, deploy content-type filtering to reject application/x-photoshop MIME types at ingress - reduces attack surface but may impact legitimate workflows requiring PSD processing. All workarounds have operational trade-offs; vendor patch is the definitive solution.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SAIL (HappySeaFox/sail) is a cross-platform image codec library supporting formats including Adobe PSD with ICC profiles and metadata. The vulnerability (CWE-787: Out-of-bounds Write) occurs in the PSD decoder's pixel buffer allocation logic. The codec calculates bytes-per-pixel as (channels * depth + 7) / 8 from raw PSD header fields, but allocates memory based on an internally-resolved pixel format enum. For LAB colorspace images with 3 channels at 16-bit depth, the calculation yields 6 bytes per pixel, while the BPP40_CIE_LAB format enum allocates only 5 bytes per pixel (40 bits). This one-byte-per-pixel discrepancy causes every pixel write operation to overflow the heap buffer boundary. The overflow is deterministic and occurs on every row during decode, making exploitation reliable. CPE identifies the affected product as cpe:2.3:a:happyseafox:sail:*:*:*:*:*:*:*:*.
Know when Sail gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (GitHub_M) · only source for this CVE.
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Executive ViewAI
SAIL image processing library versions prior to commit c930284 contain a critical remote code execution vulnerability in PSD file handling that allows unauthenticated attackers to execute arbitrary code by submitting malicious LAB-mode PSD images. Organizations using SAIL for image processing, particularly in web applications or automated workflows, face immediate risk of system compromise if user-supplied or untrusted PSD files are processed.
Vendor-released patch: commit c930284445ea3ff94451ccd7a57c999eca3bc979 (HappySeaFox/sail repository). If immediate patching is not possible: disable PSD file processing entirely, implement allowlist-based file type filtering to reject PSD inputs, isolate SAIL-dependent services in sandboxed environments, and restrict network access to systems processing image files.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Related Vulnerabilities in SAIL Image Library Buffer Overflow
View all 3The SAIL image library contains a heap buffer overflow in its XWD file parser that fails to validate the bytes_per_line
Denial of service in SAIL 1.0.1 and earlier: the built-in WebP decoder performs a divide-by-zero during loader initializ
A memory corruption vulnerability exists in the PSD Image Decoding functionality of the SAIL Image Decoding Library v0.9
A memory corruption vulnerability exists in the PSD RLE Decoding functionality of the SAIL Image Decoding Library v0.9.8
A memory corruption vulnerability exists in the BMPv3 RLE Decoding functionality of the SAIL Image Decoding Library v0.9
A memory corruption vulnerability exists in the WebP Image Decoding functionality of the SAIL Image Decoding Library v0.
A memory corruption vulnerability exists in the PCX Image Decoding functionality of the SAIL Image Decoding Library v0.9
A memory corruption vulnerability exists in the BMPv3 Palette Decoding functionality of the SAIL Image Decoding Library
A memory corruption vulnerability exists in the PCX Image Decoding functionality of the SAIL Image Decoding Library v0.9
A memory corruption vulnerability exists in the BMPv3 Image Decoding functionality of the SAIL Image Decoding Library v0
EUVD-2026-23646
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB