Security · High impactFan score 45 · Tier B
Emacs .dir-locals.el arbitrary code execution
The Brief
- Emacs 31.1 did not adequately validate the contents of .dir-locals.el before executing code from it, allowing arbitrary code execution.
- Emacs 30.2 is unaffected.
- A patch from Stefan Monnier is attached to the disclosure and will be included in the upcoming Emacs 31.2 release.
Why it matters
Opening a project containing a malicious .dir-locals.el file could run attacker-chosen code on a developer's machine when using Emacs 31.1.
Who’s affected
- Emacs 31.1 users
What to do
- Stay on or fall back to Emacs 30.2, which is unaffected, until Emacs 31.2 is released.
- Apply the patch from Stefan Monnier attached to the disclosure, or upgrade to Emacs 31.2 once it ships.
- Emacs 31.1
- Emacs 30.2
- Emacs 31.2
- #emacs
- #security
- #arbitrary-code-execution
- #dir-locals
- #vulnerability
Posted by Sean Whitton on Nov 11 X3r0Day discovered that Emacs 31.1 did not adequately validate the contents of .dir-locals.el before executing code there. Emacs 30.2 is unaffected. A patch from Stefan Monnier is attached and will be included in our upcoming 31.2 release. For…