CVE-2026-40493: SAIL - Buffer Overflow
- Cve: CVE-2026-40493
- Name: SAIL - Buffer Overflow
- Description: 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.
- Impact: Attackers can cause heap buffer overflow leading to potential memory corruption or code execution.
- Remediation: Update to the version including commit c930284445ea3ff94451ccd7a57c999eca3bc979 or later.
- Vulnerability type: buffer_overflow
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00373
- Epss percentile: 0.31712
- Assignee: [email protected]
- Published at: 2026-04-18T03:16:13Z
- Age in days: 220
- Modified at: 2026-10-26T22:10:00Z
- References total: 2
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-40493
- Nvd status: deferred
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-787 | Out-of-bounds Write |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/HappySeaFox/sail/commit/c930284445ea3ff94451ccd7a57c999eca3bc979 | nvd | |
| https://github.com/HappySeaFox/sail/security/advisories/GHSA-rcqx-gc76-r9mv | nvd |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| HappySeaFox/sail | commit, fix, security_advisory | yes | /v1/repositories/HappySeaFox/sail |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts