| Name | CVE-2024-39331 | 
| Description | In Emacs before 29.4, org-link-expand-abbrev in lisp/ol.el expands a %(...) link abbrev even when it specifies an unsafe function, such as shell-command-to-string. This affects Org Mode before 9.7.5. | 
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) | 
| References | DLA-3848-1, DLA-3849-1, DSA-5718-1, DSA-5719-1 | 
| Debian Bugs | 1074136, 1074137 | 
The table below lists information on source packages.
| Source Package | Release | Version | Status | 
|---|---|---|---|
| emacs (PTS) | bullseye | 1:27.1+1-3.1+deb11u5 | fixed | 
| bullseye (security) | 1:27.1+1-3.1+deb11u6 | fixed | |
| bookworm, bookworm (security) | 1:28.2+1-15+deb12u4 | fixed | |
| trixie | 1:30.1+1-6 | fixed | |
| forky, sid | 1:30.1+1-9 | fixed | |
| org-mode (PTS) | bullseye (security), bullseye | 9.4.0+dfsg-1+deb11u3 | fixed | 
| bookworm | 9.5.2+dfsh-5 | vulnerable | |
| trixie | 9.7.29+dfsg-1 | fixed | |
| forky, sid | 9.7.34+dfsg-1 | fixed | 
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs | 
|---|---|---|---|---|---|---|
| emacs | source | buster | 1:26.1+1-3.2+deb10u6 | DLA-3849-1 | ||
| emacs | source | bullseye | 1:27.1+1-3.1+deb11u5 | DSA-5719-1 | ||
| emacs | source | bookworm | 1:28.2+1-15+deb12u3 | DSA-5719-1 | ||
| emacs | source | (unstable) | 1:29.4+1-1 | 1074137 | ||
| org-mode | source | buster | 9.1.14+dfsg-3+deb10u3 | DLA-3848-1 | ||
| org-mode | source | bullseye | 9.4.0+dfsg-1+deb11u3 | DSA-5718-1 | ||
| org-mode | source | (unstable) | 9.7.5+dfsg-1 | 1074136 | 
[bookworm] - org-mode <ignored> (Produces only a dependency binary package)
https://www.openwall.com/lists/oss-security/2024/06/23/1
Fixed by: https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29.4&id=c645e1d8205f0f0663ec4a2d27575b238c646c7c (emacs-29.4)
Fixed by: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f4cc61636947b5c2f0afc67174dd369fe3277aa8 (release_9.7.5)