{"id":"CVE-2026-70654","summary":"libvips: A well-crafted PPM image processed via a custom source could lead to possible heap buffer write overflow","details":"libvips is a fast image processing library with low memory needs. Prior to version 8.18.3, applications that define unusual custom libvips sources and use them to process untrusted uncompressed PPM images can trigger a max/min error in vips_source_read_to_memory in libvips/iofuncs/source.c. The function uses VIPS_MAX instead of VIPS_MIN when selecting the remaining read size, allowing up to 4032 bytes to be written beyond the allocated heap buffer and causing memory corruption or a process crash. This issue is fixed in version 8.18.3.","aliases":["GHSA-rjmm-3qch-m9rg"],"modified":"2026-08-24T03:59:14.753535Z","published":"2026-08-20T21:07:25.540Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70654.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-122"]},"references":[{"type":"WEB","url":"https://github.com/libvips/libvips/releases/tag/v8.18.3"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70654.json"},{"type":"ADVISORY","url":"https://github.com/libvips/libvips/security/advisories/GHSA-rjmm-3qch-m9rg"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-70654"},{"type":"FIX","url":"https://github.com/libvips/libvips/commit/80e021c6cdda0f80b756c2109d99839c94c03258"},{"type":"FIX","url":"https://github.com/libvips/libvips/pull/5038"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/libvips/libvips","events":[{"introduced":"0"},{"fixed":"80e021c6cdda0f80b756c2109d99839c94c03258"},{"fixed":"3664cfc5dc2c5661288f5bf5a85ccc51c64c1626"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"8.18.3"}],"source":["AFFECTED_FIELD","REFERENCES"]}}],"versions":["v8.18.3-rc1","v8.18.2","v8.18.1","v8.18.0","v8.18.0-rc3","v8.18.0-rc2","v8.18.0-rc1","v8.18.0-alpha2","v8.18.0-alpha1","v8.17.0-rc1","v8.17.0","v8.17.0-test4","v8.17.0-test3","v8.17.0-test2","v8.17.0-test1","v8.16.0","v8.16.0-rc2","v8.16.0-rc1","v8.15.0","v8.15.0-rc2","v8.14.0","v8.14.0-rc1","v8.13.0","v8.13.0-rc2","v8.13.0-rc1","v8.13.0-pre1","v8.12.0","v8.12.0-rc1","v8.11.0","v8.11","v8.11.0-rc1","v8.10.6-beta2","v8.10.0","v8.10.0-rc2","v8.10.0-rc1","v8.10.0-beta2","v8.10.0-beta1","v8.9.0","v8.9.0-rc4","v8.9.0-rc3","v8.9.0-rc2","v8.9.0-rc1","v8.9.0-beta2","v8.9.0-beta1","v8.9.0-alpha1","v8.8.0-rc3","v8.8.0","v8.8.0-rc2","v8.8.0-rc1","v8.7.0","v8.7.0-rc3","v8.7.0-rc2","v8.7.0-rc1","v8.7.0-alpha2","v8.6.0","v8.6.0-beta2","v8.6.0-beta1","v8.6.0-alpha2","v8.6.0-alpha1","v8.5.3","v8.5.2","v8.5.1","v8.3.0","v8.2.2","v8.1","v8.0-beta","v7.28.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-70654.json","vanir_signatures_modified":"2026-08-24T03:59:14Z","vanir_signatures":[{"digest":{"line_hashes":["25287121048335487394403812587422003181","271337749109176837740832899187038253425","32870987863670820058031403888238066276","73159805886458681849972237160515223997"],"threshold":0.9},"id":"CVE-2026-70654-17b1b127","signature_type":"Line","signature_version":"v1","source":"https://github.com/libvips/libvips/commit/80e021c6cdda0f80b756c2109d99839c94c03258","target":{"file":"libvips/iofuncs/source.c"},"deprecated":false},{"source":"https://github.com/libvips/libvips/commit/3664cfc5dc2c5661288f5bf5a85ccc51c64c1626","target":{"file":"libvips/foreign/radiance.c"},"deprecated":false,"digest":{"line_hashes":["40871188566960555797534865343993917120","280583468346626059971461642282471659907","124457516850962973310175479744249140645","328053393552607056949457160698094811715","215634287215946805611721991023061710430","156768635521381228100771632092021262850","277582039530558050549102845751760158295","293496822736095924310907936123479200764","247399218563492718961184865847735965900","335249549507646226668533406698177255556","39003126028108026901725344741125630115","319954858964960260251026803592065571652","287170327211599960049231835358937974244","93930203671943223743569148747746365986"],"threshold":0.9},"id":"CVE-2026-70654-4e5493d3","signature_type":"Line","signature_version":"v1"},{"signature_version":"v1","source":"https://github.com/libvips/libvips/commit/3664cfc5dc2c5661288f5bf5a85ccc51c64c1626","target":{"file":"libvips/foreign/radiance.c","function":"scanline_read_old"},"deprecated":false,"digest":{"function_hash":"72490777654407013462939268128658569853","length":994},"id":"CVE-2026-70654-aed2a489","signature_type":"Function"}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N"}]}