Local Security Bug in GNU Emacs

Nov 05, 2007

A vulnerability in the extended text editor GNU Emacs gives local attackers the ability to run arbitrary code.

Developer Drake Wilson disclosed the vulnerability on the Debian Security mailing list. The error is caused by incorrect behavior of the "hack-local-variables" function if it is set to ":safe". The documentation for the function states that Emacs only runs variables that are declared as safe in this case, but this is not true: Emacs actually ignores the function and uses any local variable. An attacker could exploit this to modify the current user’s init file and execute code by means of a carefully crafted Emacs Lisp file.

The bug affects Emacs version 22.1 and possibly others. The Emacs 22.1 package in the Debian Etch repository does not have the bug says another developer. A fix is available from the CVS repository. The vulnerability has been assigned CVE ID CVE-2007-5795. The GNU Emacs maintainer has been notified.

Related content

comments powered by Disqus

Issue 169/2014

Buy this issue as a PDF

Digital Issue: Price $9.99
(incl. VAT)

News