cve.bz

CVE-2022-48339 gnu emacs: Improper Encoding or Escaping of Output

7.8 highEPSS 1.1%Fix available

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

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

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
1.1% (unchanged from 1.1% a week ago; 1.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 67th 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.
CWEs
CWE-116 Improper Encoding or Escaping of Output
CWE-1116 Inaccurate Source Code Comments
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-48339 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-48339?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-48339?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-48339 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
Debian10emacs1:26.1+1-3.2+deb10u4DLA-3416-1
Debian11emacs1:27.1+1-3.1+deb11u2DSA-5360-1
Debian12, 13, 14emacs1:28.2+1-11DEBIAN-CVE-2022-48339
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 5 morexemacs21, xemacs21-packagesno fix listedUBUNTU-CVE-2022-48339
Ubuntu22.04:LTSemacs1:27.1+1-3ubuntu5.2UBUNTU-CVE-2022-48339 USN-7027-1
UbuntuPro:16.04:LTSemacs2424.5+1-6ubuntu1.1+esm2UBUNTU-CVE-2022-48339 USN-5955-1 USN-7027-1
UbuntuPro:18.04:LTSemacs2525.2+1-6ubuntu0.1~esm2UBUNTU-CVE-2022-48339 USN-7027-1
UbuntuPro:20.04:LTSemacs1:26.3+1-1ubuntu2+esm1UBUNTU-CVE-2022-48339 USN-7027-1
UbuntuPro:24.04:LTSemacs1:29.3+1-1ubuntu2+esm1USN-7027-1
Red Hatenterprise_linux:7::client, enterprise_linux:7::server, enterprise_linux:7::workstationemacs, emacs-el, emacs-nox and 4 more1:24.3-23.el7_9.1RHSA-2023:3481
Red Hatenterprise_linux:7::computenodeemacs, emacs-el, emacs-nox and 3 more1:24.3-23.el7_9.1RHSA-2023:3481
Red Hatenterprise_linux:8::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:26.1-11.el8RHSA-2023:7083
Red Hatenterprise_linux:8::baseosemacs, emacs-filesystem1:26.1-11.el8RHSA-2023:7083
Red Hatenterprise_linux:9::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:27.2-8.el9_2.1RHSA-2023:2626
Red Hatrhel_eus:8.6::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:26.1-7.el8_6.3RHSA-2024:1103
Red Hatrhel_eus:8.6::baseosemacs, emacs-filesystem1:26.1-7.el8_6.3RHSA-2024:1103
Red Hatrhel_eus:8.8::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:26.1-10.el8_8.4RHSA-2024:1408
Red Hatrhel_eus:8.8::baseosemacs, emacs-filesystem1:26.1-10.el8_8.4RHSA-2024:1408
SUSEEnterprise Storage 7, Enterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP1-LTSS and 12 moreemacs25.3-150000.3.15.1SUSE-SU-2023:0675-1
SUSELinux Enterprise Module for Basesystem 15 SP4, Linux Enterprise Module for Desktop Applications 15 SP4emacs27.2-150400.3.6.1SUSE-SU-2023:0598-1
SUSELinux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP4-ESPOS, Linux Enterprise Server 12 SP4-LTSS and 5 moreemacs24.3-25.12.1SUSE-SU-2023:0597-1
openSUSELeap 15.4emacs27.2-150400.3.6.1SUSE-SU-2023:0598-1
openSUSETumbleweedemacs28.2-2.1openSUSE-SU-2024:12721-1
AlmaLinux8emacs, emacs-nox, emacs-lucid and 3 more1:26.1-11.el8ALSA-2023:7083
AlmaLinux9emacs, emacs-nox, emacs-lucid and 2 more1:27.2-8.el9_2.1ALSA-2023:2626
Rocky Linux8emacs1:26.1-11.el8RLSA-2023:7083
Azure Linux2emacs28.2-4AZL-13682

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; Rocky Linux's errata, BSD-3-Clause; 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 introduces untrusted input, via a file or directory with a crafted name. For this reason, this flaw has been rated with a Moderate security impact.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7emacs-1:24.3-23.el7_9.1Fixed 2023-06-06RHSA-2023:3481
Red Hat Enterprise Linux 8emacs-1:26.1-11.el8Fixed 2023-11-14RHSA-2023:7083
Red Hat Enterprise Linux 8.6 Extended Update Supportemacs-1:26.1-7.el8_6.3Fixed 2024-03-05RHSA-2024:1103
Red Hat Enterprise Linux 8.8 Extended Update Supportemacs-1:26.1-10.el8_8.4Fixed 2024-03-19RHSA-2024:1408
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

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-48339.

Attack patterns (CAPEC)

  • CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-104 Cross Zone Scripting 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