DescriptionAn issue was discovered in GNU Emacs through 28.2. In ruby-mode.el, the ruby-find-library-file function has a local command injection vulnerability. The ruby-find-library-file function is an interactive function, and bound to C-c C-f. Inside the function, the external command gem is called through shell-command-to-string, but the feature-name parameters are not escaped. Thus, malicious Ruby source files may cause commands to be executed.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub advisories/code/issues, web search, more)
Debian Bugs1031730

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
emacs (PTS)buster1:26.1+1-3.2+deb10u2fixed
buster (security)1:26.1+1-3.2+deb10u3fixed
bullseye (security)1:27.1+1-3.1+deb11u2fixed
sid, bookworm1:28.2+1-13fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
emacssourcebuster(not affected)


[buster] - emacs <not-affected> (Vulnerable code introduced later)
Introduced by: (emacs-27.0.90)
Fixed by:

Search for package or bug name: Reporting problems