CVE-2007-5795
Status: ModifiedMedium (6.3)—💥 Exploit
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.
CVSS
- Version: 2.0
- Vector: AV:L/AC:M/Au:N/C:N/I:C/A:C
- Base score: 6.3
Exploitation probability (EPSS)
- Probability of exploitation in the next 30 days: 0.72%
- Percentile among all scored CVEs: 52
- Score date: 10/7/2026
EPSS (Exploit Prediction Scoring System, FIRST) estimates how likely a vulnerability is to be exploited in the wild within 30 days. It complements CVSS (impact) and CISA KEV (confirmed exploitation).
💥 Public exploits
Exploit code or detection templates are publicly available. This is not the same as confirmed active exploitation (KEV), but it raises the risk: patch with priority.
- Published on Exploit-DB · GNU Emacs 22.1 - Local Variable Handling Code Execution (11/2/2007)
Affected technologies (1)
CWEs
- NVD-CWE-Other
References
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=449008
- http://bugs.gentoo.org/show_bug.cgi?id=197958
- http://cvs.savannah.gnu.org/viewvc/emacs/emacs/lisp/files.el?r1=1.896.2.28&r2=1.896.2.29
- http://docs.info.apple.com/article.html?artnum=307562
- http://lists.apple.com/archives/security-announce/2008/Mar/msg00001.html
- http://osvdb.org/42060
- http://secunia.com/advisories/27508
- http://secunia.com/advisories/27627
- http://secunia.com/advisories/27728
- http://secunia.com/advisories/27984
- http://secunia.com/advisories/29420
- http://security.gentoo.org/glsa/glsa-200712-03.xml
- http://www.mandriva.com/security/advisories?name=MDVSA-2008:034
- http://www.securityfocus.com/bid/26327
- http://www.ubuntu.com/usn/usn-541-1
- http://www.vupen.com/english/advisories/2007/3715
- http://www.vupen.com/english/advisories/2008/0924/references
- https://exchange.xforce.ibmcloud.com/vulnerabilities/38263
- https://www.redhat.com/archives/fedora-package-announce/2007-November/msg00524.html
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=449008
- http://bugs.gentoo.org/show_bug.cgi?id=197958
- http://cvs.savannah.gnu.org/viewvc/emacs/emacs/lisp/files.el?r1=1.896.2.28&r2=1.896.2.29
- http://docs.info.apple.com/article.html?artnum=307562
- http://lists.apple.com/archives/security-announce/2008/Mar/msg00001.html
- http://osvdb.org/42060
- http://secunia.com/advisories/27508
- http://secunia.com/advisories/27627
- http://secunia.com/advisories/27728
- http://secunia.com/advisories/27984
- http://secunia.com/advisories/29420
- http://security.gentoo.org/glsa/glsa-200712-03.xml
- http://www.mandriva.com/security/advisories?name=MDVSA-2008:034
- http://www.securityfocus.com/bid/26327
- http://www.ubuntu.com/usn/usn-541-1
- http://www.vupen.com/english/advisories/2007/3715
- http://www.vupen.com/english/advisories/2008/0924/references
- https://exchange.xforce.ibmcloud.com/vulnerabilities/38263
- https://www.redhat.com/archives/fedora-package-announce/2007-November/msg00524.html
Raw JSON (NVD)
Show
{
"id": "CVE-2007-5795",
"cveTags": [],
"metrics": {
"cvssMetricV2": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"version": "2.0",
"baseScore": 6.3,
"accessVector": "LOCAL",
"vectorString": "AV:L/AC:M/Au:N/C:N/I:C/A:C",
"authentication": "NONE",
"integrityImpact": "COMPLETE",
"accessComplexity": "MEDIUM",
"availabilityImpact": "COMPLETE",
"confidentialityImpact": "NONE"
},
"acInsufInfo": false,
"impactScore": 9.2,
"baseSeverity": "MEDIUM",
"obtainAllPrivilege": false,
"exploitabilityScore": 3.4,
"obtainUserPrivilege": false,
"obtainOtherPrivilege": false,
"userInteractionRequired": false
}
]
},
"affected": [
{
"source": "secalert@redhat.com",
"affectedData": [
{
"vendor": "n/a",
"product": "n/a",
"versions": [
{
"status": "affected",
"version": "n/a"
}
]
}
]
}
],
"published": "2007-11-02T22:46:00.000",
"references": [
{
"url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=449008",
"source": "secalert@redhat.com"
},
{
"url": "http://bugs.gentoo.org/show_bug.cgi?id=197958",
"source": "secalert@redhat.com"
},
{
"url": "http://cvs.savannah.gnu.org/viewvc/emacs/emacs/lisp/files.el?r1=1.896.2.28&r2=1.896.2.29",
"source": "secalert@redhat.com"
},
{
"url": "http://docs.info.apple.com/article.html?artnum=307562",
"source": "secalert@redhat.com"
},
{
"url": "http://lists.apple.com/archives/security-announce/2008/Mar/msg00001.html",
"source": "secalert@redhat.com"
},
{
"url": "http://osvdb.org/42060",
"source": "secalert@redhat.com"
},
{
"url": "http://secunia.com/advisories/27508",
"source": "secalert@redhat.com"
},
{
"url": "http://secunia.com/advisories/27627",
"source": "secalert@redhat.com"
},
{
"url": "http://secunia.com/advisories/27728",
"source": "secalert@redhat.com"
},
{
"url": "http://secunia.com/advisories/27984",
"source": "secalert@redhat.com"
},
{
"url": "http://secunia.com/advisories/29420",
"source": "secalert@redhat.com"
},
{
"url": "http://security.gentoo.org/glsa/glsa-200712-03.xml",
"source": "secalert@redhat.com"
},
{
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2008:034",
"source": "secalert@redhat.com"
},
{
"url": "http://www.securityfocus.com/bid/26327",
"source": "secalert@redhat.com"
},
{
"url": "http://www.ubuntu.com/usn/usn-541-1",
"source": "secalert@redhat.com"
},
{
"url": "http://www.vupen.com/english/advisories/2007/3715",
"source": "secalert@redhat.com"
},
{
"url": "http://www.vupen.com/english/advisories/2008/0924/references",
"source": "secalert@redhat.com"
},
{
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/38263",
"source": "secalert@redhat.com"
},
{
"url": "https://www.redhat.com/archives/fedora-package-announce/2007-November/msg00524.html",
"source": "secalert@redhat.com"
},
{
"url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=449008",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://bugs.gentoo.org/show_bug.cgi?id=197958",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://cvs.savannah.gnu.org/viewvc/emacs/emacs/lisp/files.el?r1=1.896.2.28&r2=1.896.2.29",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://docs.info.apple.com/article.html?artnum=307562",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://lists.apple.com/archives/security-announce/2008/Mar/msg00001.html",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://osvdb.org/42060",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://secunia.com/advisories/27508",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://secunia.com/advisories/27627",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://secunia.com/advisories/27728",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://secunia.com/advisories/27984",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://secunia.com/advisories/29420",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://security.gentoo.org/glsa/glsa-200712-03.xml",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2008:034",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.securityfocus.com/bid/26327",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.ubuntu.com/usn/usn-541-1",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.vupen.com/english/advisories/2007/3715",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.vupen.com/english/advisories/2008/0924/references",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/38263",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://www.redhat.com/archives/fedora-package-announce/2007-November/msg00524.html",
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "NVD-CWE-Other"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "La función hack-local-variables en el Emacs anterior al 22.2, cuando el enable-local-variables está establecido a :safe, no busca correctamente las listas de las variables no seguras o de riesgo, lo que permite a permite a atacantes con la intervención del usuario evitar las restricciones y modificar variables de programa críticas a través de un fichero que contiene declaraciones de variables Locales."
}
],
"lastModified": "2026-06-16T22:46:50.370",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:o:debian:debian_linux:*:*:*:*:*:*:*:*",
"vulnerable": false,
"matchCriteriaId": "4C8919F1-CD33-437E-9627-69352B276BA3"
}
],
"operator": "OR"
},
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:gnu:emacs:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "F4FB1FAE-4C0F-4F1E-B2D8-C56B5603937D",
"versionEndIncluding": "22.1"
}
],
"operator": "OR"
}
],
"operator": "AND"
},
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:gnu:emacs:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "F4FB1FAE-4C0F-4F1E-B2D8-C56B5603937D",
"versionEndIncluding": "22.1"
}
],
"operator": "OR"
}
]
}
],
"vendorComments": [
{
"comment": "Not vulnerable. This issue did not affect versions of Emacs as shipped with Red Hat Enterprise Linux 2.1, 3, 4, or 5.",
"lastModified": "2007-11-09T00:00:00",
"organization": "Red Hat"
}
],
"sourceIdentifier": "secalert@redhat.com"
}