GNU Emacs Temporary File Creation Vulnerability

BID:1126

Info

GNU Emacs Temporary File Creation Vulnerability

Bugtraq ID: 1126
Class: Race Condition Error
CVE:
Remote: No
Local: Yes
Published: Apr 18 2000 12:00AM
Updated: Apr 18 2000 12:00AM
Credit: This vulnerability was announced in a RUS-Cert advisory on April 18, 2000.
Vulnerable: GNU Emacs 20.6
GNU Emacs 20.5
GNU Emacs 20.4
GNU Emacs 20.3
GNU Emacs 20.2
GNU Emacs 20.1
GNU Emacs 20.0
+ Debian Linux 3.0 sparc
+ Debian Linux 3.0 s/390
+ Debian Linux 3.0 ppc
+ Debian Linux 3.0 mipsel
+ Debian Linux 3.0 mips
+ Debian Linux 3.0 m68k
+ Debian Linux 3.0 ia-64
+ Debian Linux 3.0 ia-32
+ Debian Linux 3.0 hppa
+ Debian Linux 3.0 arm
+ Debian Linux 3.0 alpha
Not Vulnerable:

Discussion

GNU Emacs Temporary File Creation Vulnerability

A vulnerability exists in Emacs 20, from GNU. Current versions of Emacs are incapable of securely creating temporary files from emacs-lisp. File names are predictable, and will follow existing symlinks. This would allow for a myriad of attacks, from overwriting files, to gaining access to any Emacs user's account.

Exploit / POC

GNU Emacs Temporary File Creation Vulnerability

To exploit this vulnerability, one would simply need to observe the creation of temporary files in /tmp, note the pattern, and create symbolic links to alternate files on the filesystem. For instance, one could create a symbolic link to ~usertoattack/.rhosts, and gain access to that account.

Solution / Fix

GNU Emacs Temporary File Creation Vulnerability

Solution:
Currently the SecurityFocus staff are not aware of any vendor supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: [email protected].

It has been indicated that this problem will not be suitably fixed until Emacs 21. A temporary solution is to define alternate temporary directories for modes which use temporary files. This is defined on a per-module basis.

References

GNU Emacs Temporary File Creation Vulnerability

References:
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report