Gnu Emacs vulnerabilities
42 vulnerabilities
Known vulnerabilities in Gnu Emacs, newest first, with CVSS severity, EPSS, KEV listings, ransomware use and the affected versions.
RoutineCVE-2026-131959gnu · emacs +6 moregnu emacsGNU Emacs 31.1 contains a code injection vulnerability in its handling of directory-local variables. A crafted .dir-locals.el can supply a (REGEXP FUNCTION t) entry in auto-mode-alist; when a matching file is opened, Emacs calls FUNCTION before set-auto-mode--dir-local-valid-p validates it, executing arbitrary Emacs Lisp with the privileges of the Emacs process. (Emacs 30.2 is unaffected.)CVSS7.8HighEPSS0.18%RoutineCVE-2026-108976gnu · emacs +19 moregnu emacsGNU Emacs before 31.2 (and TRAMP through 2.8.2) allows OS command injection via a filename because tramp-user-regexp has an incomplete list of disallowed inputs. NOTE: this issue exists because of an incomplete fix for CVE-2026-79992.CVSS7.8HighEPSS0.65%RoutineCVE-2026-96269gnu · emacs +17 moregnu emacsGNU Emacs 28.1 through 31.1 allows arbitrary code execution upon opening a file, because an untrusted value of read-symbol-shorthands affects the intern and unintern functions. This affects the default configuration; no particular user settings are required to trigger it.CVSS7.5HighEPSS0.14%RoutineCVE-2026-77219gnu · emacs +6 moreGNU Emacs < 31.0.91 Heap Over-Read via PBM/PPM/PGM Image LoaderGNU 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.CVSS7.1HighEPSS0.13%RoutineCVE-2026-71394gnu · emacs +6 moreHeap Use of Uninitialized Memory in GNU Emacs for AndroidGNU Emacs for Android improperly validates the table header input in sfnt_read_table_directory() in src/sfnt.c. Due to an incorrect comparison variable in the read-length check, a crafted font file that claims to contain more table directory entries than actually present causes the parser to return a struct with uninitialized heap memory in the table directory entries. An attacker can deliver a malicious font file via email, EWW (Emacs Web Wowser), or documents with custom faces, causing Emacs to load it. This leads to the use of uninitialized heap data in subsequent table lookups, potentially resulting in information disclosure, crashes, or arbitrary memory access on 32-bit targets.
This issue is fixed after commit 7621ee1d01229d50e5c0cddea6bf0b01095a62cfCVSS5.3MediumEPSS0.28%RoutineCVE-2026-71393gnu · emacs +6 moreHeap Buffer Overflow in GNU Emacs for AndroidGNU Emacs for Android is vulnerable to an integer overflow in sfnt_read_name_table() in src/sfnt.c. The function computes an allocation size using a 32-bit length value from a TrueType font file without overflow checking. On 32-bit targets, a crafted font causes the calculation to wrap, resulting in an undersized heap allocation. A subsequent read() call writes beyond the buffer, causing a heap buffer overflow. An attacker can deliver a malicious font file via email, EWW (Emacs Web Wowser), or documents with custom faces, causing Emacs to load it. This can lead to heap memory corruption and potential code execution.
This issue was fixed in commit d51a4722316efe0960994d371e1859099894d1caCVSS5.3MediumEPSS0.39%RoutineCVE-2026-71392gnu · emacs +6 moreInteger Overflow in GNU Emacs for AndroidGNU Emacs for Android is vulnerable to an integer overflow in the sfnt_read_cmap_format_12() function in src/sfnt.c. When processing a crafted TrueType font file, an unguarded addition in the xmalloc allocation call wraps around on 32-bit builds, causing a heap buffer overflow write. An attacker can deliver a malicious font file via email, EWW (Emacs Web Wowser), or documents with custom faces, causing Emacs to load it. This results in heap memory corruption that can lead to code execution.
This issue was fixed in commit c4e20777c26548722a37b03db93243e83a0d6188CVSS5.3MediumEPSS0.39%RoutineCVE-2026-71391gnu · emacs +6 moreOff-by-One Error in GNU Emacs for AndroidGNU Emacs for Android contains an off-by-one error in the gvar table parser in src/sfnt.c. The shared-coordinate index boundary check in sfnt_vary_simple_glyph() and sfnt_vary_compound_glyph() uses a strict greater-than comparison instead of greater-than-or-equal, allowing a crafted TrueType variable font to bypass the check and trigger a heap-based out-of-bounds read via memcpy. An attacker can deliver a malicious font file via email, EWW (Emacs Web Wowser), or documents with custom faces, causing Emacs to load it. This exposes heap memory contents which can be later used to defeat ASLR.
This issue was fixed in commit 95ab9ef627b212d74d321c5bbb5b56a1be7b9fbeCVSS5.3MediumEPSS0.33%RoutineCVE-2026-6861gnu · emacs +7 moreEmacs: emacs: memory corruption vulnerability when processing svg cssA flaw was found in GNU Emacs. This vulnerability, a memory corruption issue, occurs when Emacs processes specially crafted SVG (Scalable Vector Graphics) CSS (Cascading Style Sheets) data. A local user could exploit this by convincing a victim to open a malicious SVG file, which may lead to a denial of service (DoS) or potentially information disclosure.CVSS7.1HighEPSS0.11%RoutineCVE-2024-53920gnu · emacs +38 moregnu emacsIn elisp-mode.el in GNU Emacs before 30.1, a user who chooses to invoke elisp-completion-at-point (for code completion) on untrusted Emacs Lisp source code can trigger unsafe Lisp macro expansion that allows attackers to execute arbitrary code. (This unsafe expansion also occurs if a user chooses to enable on-the-fly diagnosis that byte compiles untrusted Emacs Lisp source code.)CVSS7.8HighEPSS0.60%PrioritiseCVE-2024-39331gnu · emacs +37 moregnu emacsIn Emacs before 29.4, org-link-expand-abbrev in lisp/ol.el expands a %(...) link abbrev even when it specifies an unsafe function, such as shell-command-to-string. This affects Org Mode before 9.7.5.CVSS9.8CriticalEPSS1.32%RoutineCVE-2024-30205debian · debian_linux +10 moredebian debian_linuxIn Emacs before 29.3, Org mode considers contents of remote files to be trusted. This affects Org Mode before 9.6.23.CVSS7.1HighEPSS0.49%RoutineCVE-2024-30204debian · debian_linux +9 moredebian debian_linuxIn Emacs before 29.3, LaTeX preview is enabled by default for e-mail attachments.CVSS2.8LowEPSS0.47%RoutineCVE-2024-30203debian · debian_linux +9 moredebian debian_linuxIn Emacs before 29.3, Gnus treats inline MIME contents as trusted.CVSS5.5MediumEPSS0.58%RoutineCVE-2024-30202gnu · emacs +8 moregnu emacsIn Emacs before 29.3, arbitrary Lisp code is evaluated as part of turning on Org mode. This affects Org Mode before 9.6.23.CVSS7.8HighEPSS1.10%RoutineCVE-2023-2491gnu · emacs +15 moregnu emacsA flaw was found in the Emacs text editor. Processing a specially crafted org-mode code with the "org-babel-execute:latex" function in ob-latex.el can result in arbitrary command execution. This CVE exists because of a CVE-2023-28617 security regression for the emacs package in Red Hat Enterprise Linux 8.8 and Red Hat Enterprise Linux 9.2.CVSS7.8HighEPSS0.46%RoutineCVE-2023-27986gnu · emacs +4 moregnu emacsemacsclient-mail.desktop in Emacs 28.1 through 28.2 is vulnerable to Emacs Lisp code injections through a crafted mailto: URI with unescaped double-quote characters. It is fixed in 29.0.90.CVSS7.8HighEPSS0.47%RoutineCVE-2023-27985gnu · emacs +4 moregnu emacsemacsclient-mail.desktop in Emacs 28.1 through 28.2 is vulnerable to shell command injections through a crafted mailto: URI. This is related to lack of compliance with the Desktop Entry Specification. It is fixed in 29.0.90CVSS7.8HighEPSS1.08%RoutineCVE-2022-48339gnu · emacs +13 moregnu emacsAn issue was discovered in GNU Emacs through 28.2. htmlfontify.el has a command injection vulnerability. In the hfy-istext-command function, the parameter file and parameter srcdir come from external input, and parameters are not escaped. If a file name or directory name contains shell metacharacters, code may be executed.CVSS7.8HighEPSS1.16%RoutineCVE-2022-48338gnu · emacs +4 moregnu emacsAn issue was discovered in GNU Emacs through 28.2. In ruby-mode.el, the ruby-find-library-file function has a local command injection vulnerability. The ruby-find-library-file function is an interactive function, and bound to C-c C-f. Inside the function, the external command gem is called through shell-command-to-string, but the feature-name parameters are not escaped. Thus, malicious Ruby source files may cause commands to be executed.CVSS7.3HighEPSS1.68%