p PatchFirst

CVE-2026-40493

CVE-2026-40493 · SAIL has heap buffer overflow in PSD decoder — bpp mismatch in LAB 16-bit mode

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

CVSS 9.8 · Critical · EPSS 0.4% · Fix available

Published
Updated

Stack: system

Affected products and versions

  • sail

    Versions
    • < c930284445ea3ff94451ccd7a57c999eca3bc979: Affected

    No fix published

  • sail Debian:13

    Versions
    • 0.9.10-1
    • 0.9.10-2
    • 0.9.10-3
    • 0.9.8-1
    • 0.9.8-1+deb13u1
    • 0.9.9-1
    • 1.2.0-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • sail Debian:14

    Versions
    • 0.9.10-1
    • 0.9.8-1
    • 0.9.9-1
    Affected ranges
    • ECOSYSTEM: < 0.9.10-2

    Update to 0.9.10-2

  • sail Ubuntu:24.04:LTS

    Versions
    • 0.9.0+repack-1
    • 0.9.0+repack-2
    • 0.9.0+repack-2.1
    • 0.9.0+repack-2.1build1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • sail Ubuntu:25.10

    Versions
    • 0.9.7-1build1
    • 0.9.8-1
    • 0.9.9-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • sail Ubuntu:26.10

    Versions
    • 0.9.10-1
    • 0.9.10-3
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • sail Ubuntu:26.04:LTS

    Versions
    • 0.9.9-1
    • 0.9.10-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →