Article

    Cyber News / Article / Vulnerabilities in GNU Emacs software

    Vulnerabilities in GNU Emacs software
    CE
    CERT Polska-2026-08-10

    Vulnerabilities in GNU Emacs software

    CERT Polska has received a report about vulnerabilities in GNU Emacs software and participated in coordination of their disclosure.

    The vulnerabilityCVE-2026-71391: GNU Emacs for Android contains an off-by-one error in thegvartable parser insrc/sfnt.c. The shared-coordinate index boundary check insfnt_vary_simple_glyph()andsfnt_vary_compound_glyph()uses a strict greater-than comparison instead of greater-than-or-equal, allowing a craftedTrueTypevariable font to bypass the check and trigger a heap-based out-of-bounds read viamemcpy. An attacker can deliver a malicious font file via email, EWW (Emacs Web Wowser), or documents with customfaces, causing Emacs to load it. This exposes heap memory contents which can be later used to defeat ASLR.

    This issue was fixed in commit 95ab9ef627b212d74d321c5bbb5b56a1be7b9fbe

    The vulnerabilityCVE-2026-71392: GNU Emacs for Android is vulnerable to an integer overflow in thesfnt_read_cmap_format_12()function insrc/sfnt.c. When processing a craftedTrueTypefont file, an unguarded addition in thexmallocallocation call wraps around on 32-bit builds, causing a heap buffer overflow write. An attacker can deliver a malicious font file via email, EWW, or documents with customfaces, causing Emacs to load it. This results in heap memory corruption that can lead to code execution.

    This issue was fixed in commit c4e20777c26548722a37b03db93243e83a0d6188

    The vulnerabilityCVE-2026-71393: GNU Emacs for Android is vulnerable to an integer overflow insfnt_read_name_table()insrc/sfnt.c. The function computes an allocation size using a 32-bit length value from aTrueTypefont file without overflow checking. On 32-bit targets, a crafted font causes the calculation to wrap, resulting in an undersized heap allocation. A subsequentread()call writes beyond the buffer, causing a heap buffer overflow. An attacker can deliver a malicious font file via email, EWW, or documents with customfaces, causing Emacs to load it. This can lead to heap memory corruption and potential code execution.

    This issue was fixed in commit d51a4722316efe0960994d371e1859099894d1ca

    The vulnerabilityCVE-2026-71394: GNU Emacs for Android improperly validates the table header input insfnt_read_table_directory()insrc/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 astructwith uninitialized heap memory in the table directory entries. An attacker can deliver a malicious font file via email, EWW, or documents with customfaces, 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 7621ee1d01229d50e5c0cddea6bf0b01095a62cf

    We thank Michał Majchrowicz and Marcin Wyczechowski from AFINE Team for the responsible vulnerability report.

    Original source