Out-of-bounds Write Affecting sail package, versions <0.9.10-2


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.37% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-SAIL-16104345
  • published18 Apr 2026
  • disclosed18 Apr 2026

Introduced: 18 Apr 2026

CVE-2026-40493  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade Debian:unstable sail to version 0.9.10-2 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream sail package and not the sail package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

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.