CVE-2007-5795
The hack-local-variables function in Emacs before 22.2, when enable-local-variables is set to ...
The hack-local-variables function in Emacs before 22.2, when enable-local-variables is set to :safe, does not properly search lists of unsafe or risky variables, which might allow user-assisted attackers to bypass intended restrictions and modify critical program variables via a file containing a Local variables declaration.
Exploit likelihood
What each source reports
NVD Score used
6.3
The hack-local-variables function in Emacs before 22.2, when enable-local-variables is set to :safe, does not properly search lists of unsafe or risky variables, which might allow user-assisted attackers to bypass intended restrictions and modify critical program variables via a file containing a Local variables declaration.
- Record
CVE-2007-5795- CVSS 2.0
- 6.3 Medium
AV:L/AC:M/Au:N/C:N/I:C/A:C - Updated
- 2026-11-02
CVE List No score
The hack-local-variables function in Emacs before 22.2, when enable-local-variables is set to :safe, does not properly search lists of unsafe or risky variables, which might allow user-assisted attackers to bypass intended restrictions and modify critical program variables via a file containing a Local variables declaration.
- Record
CVE-2007-5795- Updated
- 2026-11-02
EUVDEUVD-2007-5765 No score
The hack-local-variables function in Emacs before 22.2, when enable-local-variables is set to :safe, does not properly search lists of unsafe or risky variables, which might allow user-assisted attackers to bypass intended restrictions and modify critical program variables via a file containing a Local variables declaration.
- Record
EUVD-2007-5765- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-qf2q-r4v7-rv34 No score
The hack-local-variables function in Emacs before 22.2, when enable-local-variables is set to ...
The hack-local-variables function in Emacs before 22.2, when enable-local-variables is set to :safe, does not properly search lists of unsafe or risky variables, which might allow user-assisted attackers to bypass intended restrictions and modify critical program variables via a file containing a Local variables declaration.
- Record
GHSA-qf2q-r4v7-rv34- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:10735-1 No score
emacs-27.2-6.2 on GA media
These are all security issues fixed in the emacs-27.2-6.2 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:10735-1- Updated
- 2026-11-02
Affected products
Affected packages
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Exploit-DB | GNU Emacs 22.1 - Local Variable Handling Code Execution | 2007-11-02 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| affected, aliases, exploits, facts, references, title | Exploit-DB, GitHub Advisories, OSV | |
| first indexed | CVE List, NVD |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2007-5795 is a medium vulnerability (CVSS 6.3) in Gnu Emacs, published November 2, 2007. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 0.72%, the 54th percentile. Fixed in emacs22 22.1+1-2+lenny1.
References
redhat.com/archives/fedora-package-announce/2007-November/msg00524.html
bugs.debian.org/cgi-bin/bugreport.cgi?bug=449008
secunia.com/advisories/27984
exchange.xforce.ibmcloud.com/vulnerabilities/38263
secunia.com/advisories/27728
vupen.com/english/advisories/2008/0924/references
Show 17 moreShow less
vupen.com/english/advisories/2007/3715
cvs.savannah.gnu.org/viewvc/emacs/emacs/lisp/files.el?r1=1.896.2.28&r2=1.896.2.29
osvdb.org/42060
ubuntu.com/usn/usn-541-1
secunia.com/advisories/29420
lists.apple.com/archives/security-announce/2008/Mar/msg00001.html
mandriva.com/security/advisories?name=MDVSA-2008:034
securityfocus.com/bid/26327
bugs.gentoo.org/show_bug.cgi?id=197958
security.gentoo.org/glsa/glsa-200712-03.xml
docs.info.apple.com/article.html?artnum=307562
secunia.com/advisories/27508
secunia.com/advisories/27627
nvd.nist.gov/vuln/detail/CVE-2007-5795
github.com/advisories/GHSA-qf2q-r4v7-rv34
suse.com/security/cve/CVE-2007-5795
suse.com/security/cve/CVE-2017-7476