QID 355223

Date Published: 2023-05-29

QID 355223: Amazon Linux Security Advisory for emacs : ALAS2023-2023-122

Gnu emacs through 28.2 allows attackers to execute commands via shell metacharacters in the name of a source-code file, because lib-src/etags.c uses the system c library function in its implementation of the ctags program.
For example, a victim may use the "ctags *" command (suggested in the ctags documentation) in a situation where the current working directory has contents that depend on untrusted input. (
( CVE-2022-45939) gnu emacs through 28.2 allows attackers to execute commands via shell metacharacters in the name of a source-code file, because lib-src/etags.c uses the system c library function in its implementation of the etags program.
For example, a victim may use the "etags -u *" command (suggested in the etags documentation) in a situation where the current working directory has contents that depend on untrusted input. (
( CVE-2022-48337) an 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. (
( CVE-2022-48338) an issue was discovered in gnu emacs through 28.2.
Htmlfontify.el has a command injection vulnerability.
In the hfy-istext-command function, the parameter file and parameter srcdir come from external input, and parameters are not escaped.
If a file name or directory name contains shell metacharacters, code may be executed.

Successful exploitation of this vulnerability could lead to a securitybreach or could affect integrity, availability, and confidentiality.

  • CVSS V3 rated as Critical - 9.8 severity.
  • CVSS V2 rated as Medium - 5.4 severity.
  • Solution
    Please refer to Amazon advisory: ALAS2023-2023-122 for affected packages and patching details, or update with your package manager.
    Vendor References

    CVEs related to QID 355223

    Software Advisories
    Advisory ID Software Component Link
    ALAS2023-2023-122 amazon linux 2023 URL Logo alas.aws.amazon.com/AL2023/ALAS-2023-122.html