cve.bz

CVE-2022-48338 gnu emacs

7.3 highEPSS 1.6%Fix available

High (7.3) in gnu emacs. EPSS 1.6% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.3 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS
1.6% (unchanged from 1.6% a week ago; 1.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 77th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-03-18. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-77 Improper Neutralization of Special Elements used in a Command
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-48338 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-48338?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-48338?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-48338 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
gnu:emacsthrough 28.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11emacs1:27.1+1-3.1+deb11u2DSA-5360-1
Debian12, 13, 14emacs1:28.2+1-11DEBIAN-CVE-2022-48338
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 5 morexemacs21, xemacs21-packagesno fix listedUBUNTU-CVE-2022-48338
Ubuntu22.04:LTSemacs1:27.1+1-3ubuntu5.2UBUNTU-CVE-2022-48338 USN-7027-1
UbuntuPro:16.04:LTSemacs2424.5+1-6ubuntu1.1+esm4USN-7027-1
UbuntuPro:18.04:LTSemacs2525.2+1-6ubuntu0.1~esm2USN-7027-1
UbuntuPro:20.04:LTSemacs1:26.3+1-1ubuntu2+esm1USN-7027-1
UbuntuPro:24.04:LTSemacs1:29.3+1-1ubuntu2+esm1USN-7027-1
Red Hatenterprise_linux:9::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:27.2-8.el9_2.1RHSA-2023:2626
SUSELinux Enterprise Module for Basesystem 15 SP4, Linux Enterprise Module for Desktop Applications 15 SP4emacs27.2-150400.3.6.1SUSE-SU-2023:0598-1
openSUSELeap 15.4emacs27.2-150400.3.6.1SUSE-SU-2023:0598-1
openSUSETumbleweedemacs28.2-2.1openSUSE-SU-2024:12721-1
AlmaLinux9emacs, emacs-nox, emacs-lucid and 2 more1:27.2-8.el9_2.1ALSA-2023:2626
Azure Linux2emacs28.2-4AZL-13681

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is only triggered when a local user runs Emacs with untrusted input. For this reason, this flaw has been rated with a Moderate security impact.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9emacs-1:27.2-8.el9_2.1Fixed 2023-05-09RHSA-2023:2626
Red Hat Enterprise Linux 6emacsOut of support scope
Red Hat Enterprise Linux 7emacsAffected
Red Hat Enterprise Linux 8emacsAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-48338.

Attack patterns (CAPEC)

  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-40 Manipulating Writeable Terminal Devices Likelihood: High · Severity: Very High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-75 Manipulating Writeable Configuration Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-136 LDAP Injection Likelihood: High · Severity: High
  • CAPEC-183 IMAP/SMTP Command Injection Severity: Medium
  • CAPEC-248 Command Injection Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON