An issue was discovered in GNU Emacs through 28.2.
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 1 fixed, 3 without a fix
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and Red Hat. Impact type from CWE-77.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
Remediation
Red Hat 1 advisory
- RHSA-2023:2626 Released 2023-05-09 · Red Hat rating Importantemacs security update
- Red Hat Enterprise Linux AppStream (v. 9) emacs-1:27.2-8.el9_2.1, emacs-common-1:27.2-8.el9_2.1, emacs-filesystem-1:27.2-8.el9_2.1 +2
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix yet |
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2023:2626 |
Timeline
- 2026-10-02 Threatist record created from CVE-2022-48338
- 2026-10-03 Alias added: GHSA-hm6m-2xg8-mc5q
References
More GNU Emacs vulnerabilities
- TI-2024-36089 In elisp-mode.el in GNU Emacs before 30.1, a user who chooses to invoke… CVSS 3.1HIGH 7.8
- TI-2023-12576 emacsclient-mail.desktop in Emacs 28.1 through 28.2 is vulnerable to Emacs Lisp code… CVSS 3.1HIGH 7.8
- TI-2022-23951 GNU Emacs through 28.2 allows attackers to execute commands via shell metacharacters in… CVSS 3.1CRITICAL 9.8
- TI-2024-26287 In Emacs before 29.4, org-link-expand-abbrev in lisp/ol.el expands a %(...) link abbrev… CVSS 3.1CRITICAL 9.8
- TI-2007-05829 Stack-based buffer overflow in emacs allows user-assisted attackers to cause a denial of… CVSS 2.0HIGH 10.0
- TI-2017-10588 GNU Emacs before 25.3 allows remote attackers to execute arbitrary code via email with… CVSS 3.0HIGH 8.8
Sources
- CVE-2022-48338 · CVE Program
- CVE-2022-48338 · NVD
- FIRST EPSS
- GHSA-hm6m-2xg8-mc5q · GitHub Advisory Database · CC BY 4.0
- CVE-2022-48338 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences