SecurityContext

CVE-2026-40492: SAIL - Buffer Overflow

  • Cve: CVE-2026-40492
  • 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 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02, the XWD codec resolves pixel format based on `pixmap_depth` but the byte-swap code uses `bits_per_pixel` independently. When `pixmap_depth=8` (BPP8_INDEXED, 1 byte/pixel buffer) but `bits_per_pixel=32`, the byte-swap loop accesses memory as `uint32_t*`, reading/writing 4x the allocated buffer size. This is a different vulnerability from the previously reported GHSA-3g38-x2pj-mv55 (CVE-2026-27168), which addressed `bytes_per_line` validation. Commit 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02 contains a patch.
  • Impact: Attackers can cause memory corruption leading to potential denial of service or code execution.
  • Remediation: Update to the version including commit 36aa5c7ec8a2bb35f6fb867a1177a6f141156b02 or later.
  • Vulnerability type: buffer_overflow
  • Vulnerability impact: denial_of_service, 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.00419
  • Epss percentile: 0.36678
  • Assignee: [email protected]
  • Published at: 2026-04-18T03:16:13Z
  • Age in days: 220
  • Modified at: 2026-10-26T21:10:00Z
  • References total: 2
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-40492
  • 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

IdName
CWE-787Out-of-bounds Write

References

UrlSourceTags
https://github.com/HappySeaFox/sail/commit/36aa5c7ec8a2bb35f6fb867a1177a6f141156b02nvd
https://github.com/HappySeaFox/sail/security/advisories/GHSA-526v-vm72-4v64nvd

Projects

RepositoryLink kindsIndexedUrl
HappySeaFox/sailcommit, fix, security_advisoryyes/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