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 full details on the vul
Briefing
Written from the coverage below · deepseek-v4.1-flash
Emacs 31.1 failed to adequately validate the contents of .dir-locals.el before executing code, allowing arbitrary code execution. A patch from Stefan Monnier is attached and will ship in Emacs 31.2; version 30.2 is unaffected.
Why it mattersOpening an untrusted project directory in a vulnerable Emacs can execute attacker-controlled code without further interaction, compromising the developer workstation.
ActionUpdate Emacs to 31.2 when released; until then, apply the attached patch or avoid opening untrusted directories with .dir-locals.el.
Coverage
1 article