CVE-2022-45939: OS Command Injection

Published Nov 28, 2022
·
Updated

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.

Affected Software

7 affected componentsFixes available
GNU Emacs<=28.2
Debian Debian Linux=10.0
Debian Debian Linux=11.0
Fedoraproject Fedora=36
Fedoraproject Fedora=37
debian/emacs
1:27.1+1-3.1+deb11u51:27.1+1-3.1+deb11u61:28.2+1-15+deb12u41:30.1+1-5
debian/xemacs21<=21.4.24-9
21.4.24-1121.4.24-12

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/emacs to a version that resolves this vulnerability.

    Fixed in 1:27.1+1-3.1+deb11u5Fixed in 1:27.1+1-3.1+deb11u6Fixed in 1:28.2+1-15+deb12u4Fixed in 1:30.1+1-5
  2. Upgrade

    Upgrade debian/xemacs21 to a version that resolves this vulnerability.

    Fixed in 21.4.24-11Fixed in 21.4.24-12
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch d48bb4874bc6cd3e69c7a15fc3c91cc141025c51
  4. Compensating control

    Avoid running the ctags command (e.g., 'ctags *') in a working directory whose file names may depend on untrusted input.

Event History

Nov 28, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·06:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
06:42 PM
SeverityAffected Software
Nov 29, 2022
Data Sourced
via Red Hat·06:46 PM
DescriptionSeverityAffected Software
Sep 19, 2024
Data Sourced
via Launchpad·08:43 PM
Description
Sep 23, 2024
Data Sourced
via Ubuntu·08:42 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-45939?

CVE-2022-45939 is a vulnerability in GNU Emacs that allows attackers to execute commands through shell metacharacters in the name of a source-code file.

2

How does CVE-2022-45939 affect GNU Emacs?

CVE-2022-45939 affects GNU Emacs versions up to 28.2.

3

How does CVE-2022-45939 affect Debian Linux?

CVE-2022-45939 affects Debian Linux versions 10.0 and 11.0.

4

How does CVE-2022-45939 affect Fedora Linux?

CVE-2022-45939 affects Fedora Linux versions 36 and 37.

5

How can I fix CVE-2022-45939 in GNU Emacs?

To fix CVE-2022-45939 in GNU Emacs, update to version 28.3 or later.

6

How can I fix CVE-2022-45939 in Debian Linux?

To fix CVE-2022-45939 in Debian Linux, apply the recommended security updates.

7

How can I fix CVE-2022-45939 in Fedora Linux?

To fix CVE-2022-45939 in Fedora Linux, update to a version that includes the security patch.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203