GNU Emacs before 31.0.91 contains an integer overflow in the PBM/PPM/PGM image loader that allows an attacker to leak heap memory contents by supplying a crafted image with large dimensions and an elevated max color index. The image loader multiplies image dimensions and channel count using signed integer arithmetic; for sufficiently large values, the result wraps to a negative number, bypassing the bounds check and causing the pixel reader to access heap memory past the end of the allocated buffer. The over-read contents are interpreted as pixel color values and rendered on screen.
{
"cna_assigner": "VulnCheck",
"cwe_ids": [
"CWE-125",
"CWE-190"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77219.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-77219.json"
[
{
"deprecated": false,
"digest": {
"function_hash": "258673638944095828071566080484646474381",
"length": 4506
},
"id": "CVE-2026-77219-c667c86f",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/emacs-mirror/emacs/commit/b07e634e4cf45162ae0178e32092b040587f2c6c",
"target": {
"file": "src/image.c",
"function": "pbm_load"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"195389056970384225465457360733826923154",
"30743957392029437298895236527953516614",
"111340952189053751276040701366772383005",
"191098332935111733868625331608384229249",
"138792707373502694081969352469803653663",
"153138648923648074605034718771059639440",
"65634003212636966256027357271456261512",
"310229738444058907868078119131101498351",
"164932963844408134274952941465718873097",
"124303929148704238738091731722928157762",
"120583420899258265332683383904982012131",
"272595218324774214439785912951772159062",
"105183179690217016208969693874981039260",
"58673321751195478723877138963568116108",
"309138827984967736707121349168452132665"
],
"threshold": 0.9
},
"id": "CVE-2026-77219-e8dc267d",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/emacs-mirror/emacs/commit/b07e634e4cf45162ae0178e32092b040587f2c6c",
"target": {
"file": "src/image.c"
}
}
]
"2026-08-24T03:59:17Z"