Skip to content
Heist/ feed
Back to feed
Critical

sail — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-40493

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.

Products
sail
Affected versions
0.9.0+repack-1, 0.9.0+repack-2, 0.9.0+repack-2.1, 0.9.0+repack-2.1build1, 0.9.10-1, 0.9.10-3, 0.9.7-1build1, 0.9.8-1, 0.9.9-1
Fixed versions
Not specified
CVEs
CVE-2026-40493
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:43 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-40493

core-osv · Original source

Published 18 Apr 2026, 03:16 UTC

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.

osv:UBUNTU-CVE-2026-40493

sail

Fixed versions: Not specified

sail

Fixed versions: Not specified

sail

Fixed versions: Not specified

sail

Fixed versions: Not specified

Complete source record
{
  "id": "0b359f1fbb8c3210819b23c3708f111cf60909069ab5aee4c21776af7fd356b9",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-40493",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-40493",
    "summary": "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.",
    "evidence": "osv:UBUNTU-CVE-2026-40493",
    "products": [
      {
        "name": {
          "value": "sail",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.9.0+repack-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.9.0+repack-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.9.0+repack-2.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.9.0+repack-2.1build1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "sail",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.9.7-1build1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.9.8-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.9.9-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "sail",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.9.10-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "0.9.10-3",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "sail",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.9.9-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "0.9.10-1",
            "evidence": "/affected/3/versions"
          }
        ]
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "UBUNTU-CVE-2026-40493",
      "aliases": [
        "UBUNTU-CVE-2026-40493"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "sail",
            "purl": "pkg:deb/ubuntu/sail?arch=source&distro=noble",
            "ecosystem": "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"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40493.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libsail-c++0t64",
                "binary_version": "0.9.0+repack-2.1build1"
              },
              {
                "binary_name": "libsail-common0t64",
                "binary_version": "0.9.0+repack-2.1build1"
              },
              {
                "binary_name": "libsail-manip0t64",
                "binary_version": "0.9.0+repack-2.1build1"
              },
              {
                "binary_name": "libsail0t64",
                "binary_version": "0.9.0+repack-2.1build1"
              },
              {
                "binary_name": "sail-codecs",
                "binary_version": "0.9.0+repack-2.1build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "sail",
            "purl": "pkg:deb/ubuntu/sail?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "0.9.7-1build1",
            "0.9.8-1",
            "0.9.9-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40493.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libsail-c++0t64",
                "binary_version": "0.9.9-1"
              },
              {
                "binary_name": "libsail-common0t64",
                "binary_version": "0.9.9-1"
              },
              {
                "binary_name": "libsail-manip0t64",
                "binary_version": "0.9.9-1"
              },
              {
                "binary_name": "libsail0t64",
                "binary_version": "0.9.9-1"
              },
              {
                "binary_name": "sail-codecs",
                "binary_version": "0.9.9-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "sail",
            "purl": "pkg:deb/ubuntu/sail?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "0.9.10-1",
            "0.9.10-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40493.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libsail-c++0t64",
                "binary_version": "0.9.10-3"
              },
              {
                "binary_name": "libsail-common0t64",
                "binary_version": "0.9.10-3"
              },
              {
                "binary_name": "libsail-manip0t64",
                "binary_version": "0.9.10-3"
              },
              {
                "binary_name": "libsail0t64",
                "binary_version": "0.9.10-3"
              },
              {
                "binary_name": "sail-codecs",
                "binary_version": "0.9.10-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "sail",
            "purl": "pkg:deb/ubuntu/sail?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "0.9.9-1",
            "0.9.10-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40493.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libsail-c++0t64",
                "binary_version": "0.9.10-1"
              },
              {
                "binary_name": "libsail-common0t64",
                "binary_version": "0.9.10-1"
              },
              {
                "binary_name": "libsail-manip0t64",
                "binary_version": "0.9.10-1"
              },
              {
                "binary_name": "libsail0t64",
                "binary_version": "0.9.10-1"
              },
              {
                "binary_name": "sail-codecs",
                "binary_version": "0.9.10-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:58:52.838583059Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-40493"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-40493",
        "https://www.cve.org/CVERecord?id=CVE-2026-40493",
        "https://github.com/HappySeaFox/sail/security/advisories/GHSA-rcqx-gc76-r9mv"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-40493",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 359129,
  "published_at": "2026-04-18T03:16:00+00:00"
}