Skip to content
OpenAdvisories
High · 7.1 CVE-2026-77219 EUVD-2026-64138GHSA-q8pr-2495-3jw7

GNU Emacs < 31.0.91 Heap Over-Read via PBM/PPM/PGM Image Loader

Published Aug 21, 2026 · Updated Nov 8, 2026 · Assigned by VulnCheck

Description

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.

Affected products

VendorProductAffectedFixed
GNU Emacs < 31.0.91 31.0.91

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 emacs No fix yet —
Debian 13 emacs No fix yet —
Debian 12 emacs No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 emacs +2 No fix yet —
Ubuntu 26.04 LTS xemacs21 +1 No fix yet —
Ubuntu 24.04 LTS xemacs21 +1 No fix yet —
Ubuntu 22.04 LTS xemacs21 +1 No fix yet —
Ubuntu 20.04 LTS xemacs21 +1 No fix yet —
Show 8 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS xemacs21 +1 No fix yet —
Ubuntu 16.04 LTS xemacs21 +1 No fix yet —
Ubuntu Pro 26.04 LTS emacs No fix yet —
Ubuntu Pro 24.04 LTS emacs No fix yet —
Ubuntu Pro 22.04 LTS emacs No fix yet —
Ubuntu Pro 20.04 LTS emacs No fix yet —
Ubuntu Pro 18.04 LTS emacs25 No fix yet —
Ubuntu Pro 16.04 LTS emacs24 No fix yet —
ReleasePackageFixed inAdvisory
RHEL 10 emacs +4 1:29.4-14.el10_2.3 RHSA-2026:84591
RHEL 9 emacs +4 1:27.2-18.el9_8.2 RHSA-2026:80507
RHEL 8 emacs +5 1:26.1-15.el8_10.2 RHSA-2026:80506

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 10 emacs +4 1:29.4-14.el10_2.3 ALSA-2026:84591
AlmaLinux 9 emacs +4 1:27.2-18.el9_8.2 ALSA-2026:80507
AlmaLinux 8 emacs +5 1:26.1-15.el8_10.2 ALSA-2026:80506

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 10 emacs 1:29.4-14.el10_2.3 RLSA-2026:98574, RLSA-2026:84591
Rocky Linux 10 emacs-nw +3 1:29.4-17.el10_3 RLSA-2026:98574
Rocky Linux 9 emacs 1:27.2-18.el9_8.2 RLSA-2026:80507
Rocky Linux 8 emacs 1:26.1-15.el8_10.2 RLSA-2026:80506
ReleasePackageFixed inAdvisory
SLES 15 SP7 emacs 27.2-150400.3.31.2 SUSE-SU-2026:4083-1
SLES 15 SP6 emacs 27.2-150400.3.31.2 SUSE-SU-2026:4083-1
SLES 15 SP5 emacs 27.2-150400.3.31.2 SUSE-SU-2026:4083-1
SLES 15 SP4 emacs 27.2-150400.3.31.2 SUSE-SU-2026:4083-1
SLES 12 SP5 emacs 24.3-25.26.1 SUSE-SU-2026:3993-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 emacs 30.2-160000.3.1 SUSE-SU-2026:23589-1
SLES for SAP 15 SP6 emacs 27.2-150400.3.31.2 SUSE-SU-2026:4083-1
SLES for SAP 15 SP5 emacs 27.2-150400.3.31.2 SUSE-SU-2026:4083-1
SLES for SAP 15 SP4 emacs 27.2-150400.3.31.2 SUSE-SU-2026:4083-1
SLES 16.0 emacs 30.2-160000.3.1 SUSE-SU-2026:23589-1
SLE HPC 15 SP5 emacs 27.2-150400.3.31.2 SUSE-SU-2026:4083-1
SLE HPC 15 SP4 emacs 27.2-150400.3.31.2 SUSE-SU-2026:4083-1
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 emacs 30.2-160000.3.1 openSUSE-SU-2026:21711-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 emacs +6 1:28.2-3.amzn2023.0.11 ALAS2023-2026-2147
Amazon Linux 2 emacs +6 1:27.2-4.amzn2.0.8 ALAS2-2026-3944

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 emacs 29.4-6 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 10 emacs +4 1:29.4-14.el10_2.3 ELSA-2026-84591
Oracle Linux 9 emacs +4 1:27.2-18.el9_8.2 ELSA-2026-80507
Oracle Linux 8 emacs +5 1:26.1-15.el8_10.2 ELSA-2026-80506

Advisories 20

References