CVE-2024-30205
📋 TL;DR
This vulnerability in Emacs Org mode allows remote file contents to be executed as trusted code when opened in Org mode. It affects Emacs versions before 29.3 and Org mode versions before 9.6.23. Users who open remote Org files from untrusted sources are at risk.
💻 Affected Systems
- GNU Emacs
- Org mode
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise when a user opens a malicious remote Org file.
Likely Case
Local file system access and arbitrary code execution within the user's context when opening crafted remote Org files.
If Mitigated
Limited impact if users avoid opening remote Org files from untrusted sources and have proper file access controls.
🎯 Exploit Status
Exploitation requires user interaction to open a malicious remote file. No public exploit code has been identified.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Emacs 29.3 or later, Org mode 9.6.23 or later
Vendor Advisory: https://lists.debian.org/debian-lts-announce/2024/04/msg00023.html
Restart Required: Yes
Instructions:
1. Update Emacs to version 29.3 or later using your package manager. 2. Update Org mode to version 9.6.23 or later. 3. Restart Emacs to apply changes.
🔧 Temporary Workarounds
Disable remote file loading in Org mode
allPrevent Org mode from loading remote files by setting org-link-file-path-type to 'absolute'
(setq org-link-file-path-type 'absolute)
Avoid opening remote Org files
allDo not open Org files from remote/untrusted sources until patched
🧯 If You Can't Patch
- Implement strict access controls to prevent users from opening remote files in Emacs
- Use network segmentation to restrict access to remote file sources from Emacs systems
🔍 How to Verify
Check if Vulnerable:
Check Emacs version with 'emacs --version' and Org mode version with 'M-x org-version' in Emacs
Check Version:
emacs --version | head -1
Verify Fix Applied:
Verify Emacs version is 29.3+ and Org mode version is 9.6.23+ using the same commands
📡 Detection & Monitoring
Log Indicators:
- Emacs processes accessing remote URLs with Org mode file extensions (.org)
Network Indicators:
- Outbound connections from Emacs to remote file servers when opening Org files
SIEM Query:
process.name:"emacs" AND network.destination.ip:(external_ips) AND url.path:"*.org"
🔗 References
- http://www.openwall.com/lists/oss-security/2024/03/25/2
- https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=2bc865ace050ff118db43f01457f95f95112b877
- https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29
- https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4255d5dcc0657915f90e4fba7e0a5514cced514d
- https://lists.debian.org/debian-lts-announce/2024/04/msg00023.html
- https://lists.debian.org/debian-lts-announce/2024/04/msg00024.html
- http://www.openwall.com/lists/oss-security/2024/03/25/2
- https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=2bc865ace050ff118db43f01457f95f95112b877
- https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29
- https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4255d5dcc0657915f90e4fba7e0a5514cced514d
- https://lists.debian.org/debian-lts-announce/2024/04/msg00023.html
- https://lists.debian.org/debian-lts-announce/2024/04/msg00024.html