{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-40493","id":"CVE-2026-40493","title":"SAIL has heap buffer overflow in PSD decoder — bpp mismatch in LAB 16-bit mode","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","descriptionLong":"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.","published":"2026-04-18T01:41:14.664Z","updated":"2026-10-28T10:55:10.740481311Z","reserved":"2026-04-13T19:50:42.115Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"github.com"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"}],"rating":"critical","products":["HappySeaFox sail"],"affectedProducts":[{"vendor":"HappySeaFox","product":"sail","defaultStatus":null,"versions":[{"version":"< c930284445ea3ff94451ccd7a57c999eca3bc979","status":"affected"}],"platforms":[]}],"packages":[],"cwes":["CWE-787"],"aliases":["GHSA-rcqx-gc76-r9mv"],"references":[{"url":"https://github.com/HappySeaFox/sail/security/advisories/GHSA-rcqx-gc76-r9mv","tags":["x_refsource_CONFIRM","advisory"]},{"url":"https://github.com/HappySeaFox/sail/commit/c930284445ea3ff94451ccd7a57c999eca3bc979","tags":["x_refsource_MISC","fix"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40493.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40493","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total"},"epss":0.00373,"epssPercentile":0.31977,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-40493","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40493","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-40493","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-40493","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}