Skip to main content

SAIL Image Library CVE-2026-54692

| EUVDEUVD-2026-82409 HIGH
Incorrect Calculation of Buffer Size (CWE-131)
2026-09-17 security-advisories@github.com
7.8
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious X10 XBM with odd row stride
  2. Delivery
    Deliver image file to victim application
  3. Exploit
    Application calls SAIL load API
  4. Execution
    Decode loop writes 2 bytes/literal into 1-byte buffer
  5. Persist
    Forward heap overwrite scaling with height
  6. Impact
    Process corruption, crash, or potential code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Buffer size calculation
Exploitation Conditions

Exploitation requires the victim to load an attacker-supplied XBM file in the legacy X10 'static short' format (the X11 'static char' path is explicitly NOT affected) through SAIL's sail_load_from_file, sail_load_from_memory, or sail_start_loading_* APIs in a build prior to 1.0.0. The overwrite only triggers when ceil(width/8) yields an odd row stride, which introduces a per-row padding byte the destination buffer lacks. Limiting factors: user interaction is required (the application must be induced to open the crafted image), exploitation is local/file-based (AV:L) not remote, the impact scales with image height, and reliable code execution depends on the memory layout and mitigations of the specific consuming application - absent those, the outcome is a crash rather than RCE.

Impact

The CVSS 3.1 vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (base 7.8) is internally consistent with the description: this is a file-parsing memory-safety flaw in SAIL's XBM codec, exploited locally (AV:L) when a victim application loads an attacker-supplied XBM image (UI:R), with no authentication (PR:N). The high C/I/A rating rests on the description's claim that the forward heap overwrite of file-controlled bytes can 'corrupt process state, cause reliable crashes, and potentially enable code execution' - note the word 'potentially': A:H (reliable crash/DoS) is well supported, while C:H/I:H (full code execution) is the optimistic upper bound and is not demonstrated by any published exploit. There is no EPSS score, no CISA KEV listing, and no public POC provided; the 'RCE' tag reflects potential impact, not confirmed exploitation. SSVC-wise: exploitation is 'none' (no public exploit identified), the flaw is technically well-understood (root cause and fix are public in the commit), but weaponization into reliable RCE depends heavily on the consuming application's heap layout and mitigations, making this a real-but-not-urgent priority: a legitimate memory-corruption bug worth patching, but gated behind user interaction and a niche library rather than a mass-exploitable remote CVE.

Exploit ScenarioDerived

An attacker crafts a malformed X10-format static short XBM image whose row stride ceil(width/8) is odd, so each row includes a padding byte the destination buffer was never sized for. A victim application built on SAIL loads the file via sail_load_from_file/sail_load_from_memory/sail_start_loading_*, and the decode loop writes two file-controlled bytes per literal into a buffer allocated for one byte per literal, producing a forward heap overwrite that grows with image height. No public exploit code is identified; the practical outcome is a reliable crash, with code execution only potentially achievable in a susceptible host application.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 17, 2026

Loading a crafted legacy X10 'static short' XBM image with SAIL versions prior to 1.0.0 triggers a forward heap buffer overflow in sail_codec_load_frame_v8_xbm() that lets a file-controlled write corrupt process state, reliably crash the consuming application, and potentially achieve code execution depending on the host's memory layout and mitigations. The flaw is reachable through sail_load_from_file, sail_load_from_memory, and sail_start_loading_*, but only when the destination image has an odd row stride (ceil(width/8) odd) and only on the X10 short path - the X11 'static char' path is explicitly unaffected. Exploitation is local and file-based (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 7.8) and requires the victim to open the malicious image; no public exploit code or confirmed active exploitation was identified at time of analysis, and the impact scales with image height.

RemediationAI

Vendor-released patch: upgrade SAIL to version 1.0.0 (https://github.com/HappySeaFox/sail/releases/tag/v1.0.0), which contains the fix in commit 2991e18f806cf038038ee1ef9b08aa5d57480de1; see advisory GHSA-gp27-qv2x-55v5. Rebuild and redeploy any application that statically or dynamically links the affected codec, since patching the library alone does not help a binary that bundled the old code. If an immediate upgrade is not possible, the most effective compensating control is to reject XBM input in the untrusted path - validate or filter image content-types/headers before handing data to sail_load_from_memory or sail_start_loading_*, or disable/unregister the XBM codec entirely - with the trade-off that legitimate legacy X10 XBM files will no longer render. Because the overwrite occurs only on the X10 'static short' path, a pre-parse filter that rejects XBM files containing 'short' array declarations (rather than 'char') blocks the specific trigger but relies on correctly parsing attacker-controlled text and should not be treated as a permanent fix. Running image decoding in a sandboxed, privilege-separated worker with a restrictive allocator and full memory mitigations (ASLR, heap hardening, CFG/CET) reduces the likelihood that the heap corruption escalates to code execution, at the cost of added latency and engineering complexity; note that these are mitigations against the downstream impact, not a correction of the size-calculation bug itself, and crash-only outcomes are not guaranteed on all platforms.

Affected VersionsENISA

sail < 1.0.0

Affected Packages

euvd sail fix: 1.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SAIL is a cross-platform image loading/saving library with animation, metadata, and ICC profile support. The affected component is the XBM (X BitMap) codec in src/sail-codecs/xbm/, which parses the C-style hex literal arrays used by XBM files. XBM has two historical encodings: the X11 'static char' variant, where each array element is one byte, and the legacy X10 'static short' variant, where each element is a 16-bit short written as 0xNNNN. In the X10 path the codec computes the number of literals to read as (((width + 7) / 8 + 1) / 2) * height - i.e., it rounds the byte-per-row count up to an even number of shorts per row - while the destination pixel buffer is allocated using the X11 one-byte-per-literal layout, ceil(width/8) * height. When ceil(width/8) is odd, the X10 literal count includes one padding byte per row that the destination buffer has no room for; the flat decode loop then advances the write pointer two file-controlled bytes per literal past the allocation, producing a forward heap overwrite whose size grows linearly with image height. This is a buffer-size miscalculation (CWE-131): the allocation and the decode loop disagree on row padding. The upstream fix (commit 2991e18f806cf038038ee1ef9b08aa5d57480de1, released in v1.0.0) rewrites the X10 loop to track row starts and a per-row byte_idx bounded by row_start + bytes_per_line, factors hex-literal parsing into xbm_private_read_hex_literal(), and stops reading the padding short as out-of-row data.

Know when the next one hits your stack

  • 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

Vendor (github) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

File-parsing heap overwrite needs no auth (PR:N) but a victim must open the crafted XBM (AV:L/UI:R); file-controlled memory corruption supports C/I/A:H, with A:H the most certain.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Sep 17, 2026 - 21:19 EUVD
CVE Published
Sep 17, 2026 - 20:16 cve.org
HIGH 7.8

DescriptionCVE.org

SAIL is a cross-platform library for loading and saving images with support for animation, metadata, and ICC profiles. Prior to 1.0.0, sail_codec_load_frame_v8_xbm() in src/sail-codecs/xbm/xbm.c allocates the decoded pixel buffer using the X11 one-byte-per-literal layout, but an X10 static short file causes the flat decode loop to write two file-controlled bytes per literal. When ceil(width/8) produces an odd row stride, the X10 literal count includes a padding byte for every row, but the destination has no space for those bytes, so loading the XBM through sail_load_from_file, sail_load_from_memory, or sail_start_loading_* produces a forward heap overwrite that scales with image height. The X11 static char path is not affected. The overwrite can corrupt process state, cause reliable crashes, and potentially enable code execution in a susceptible consuming application. This issue is fixed in version 1.0.0.

Technical POC Analysis

CWE-131 (incorrect calculation of buffer size) leading to CWE-787 (out-of-bounds write), both assigned in the advisory.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

SAIL image-decoding libraries in versions prior to 1.0.0 contain a heap memory-corruption flaw that is triggered when a user opens a specially crafted legacy XBM image, crashing the consuming application and potentially allowing an attacker to execute code on the affected device. Because exploitation requires a victim to open a malicious file rather than a remote attacker breaching a service, risk is concentrated in products and endpoints that process untrusted images - document viewers, messaging and email clients, browsers, and content-processing pipelines that embed SAIL. With no vendor patch available, leadership should treat this as an unmitigated exposure wherever SAIL parses images from external or user-supplied sources, and note that unauthenticated local users can trigger it with only a file open.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: block or sanitize XBM images from untrusted sources at all ingress points; disable XBM decoding in SAIL-based products (the X11 'static char' path is unaffected by this flaw but is not a safe substitute for broadly permitting the format); run image-decoding processes with least privilege and OS/container sandboxing; restrict user opening of untrusted image files; monitor vendor advisories for a fixed SAIL release.

Threat Intelligence Overview

EPSS Score
0.1%
Top 96% exploitable
Prevalence
Low
niche open-source cross-platform image library, limited production footprint
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy