Cloudanix VulnDB

CVE-2017-14482

High · 8.8

CVSS

8.8

EPSS

4.0%

Published

Sep 14, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

Someone can take over your computer simply by sending you a specially made email that you open in an outdated version of the Emacs editor.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Remote Code Execution
Component
Application
Class
Command Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Remote attackers can execute arbitrary shell commands by sending an email containing crafted text/enriched MIME data with an x-display XML element that triggers unsafe evaluation in enriched.el and mm-view.el.

Why it matters to the business

Successful exploitation grants full control of the recipient workstation, enabling data theft, persistence, or lateral movement with minimal attacker effort; the issue is confined to legacy Emacs deployments that have not been updated since 2017.

How an attack unfolds

An attacker crafts an email (or Usenet article) that uses the text/enriched content type and embeds an x-display XML tag instructing Emacs to run shell commands. When the recipient views the message in a vulnerable Emacs client, the enriched rendering code evaluates the tag without sanitization, immediately spawning the attacker-supplied commands.

How to fix it

Upgrade GNU Emacs to version 25.3 or later; disable inline rendering of enriched and richtext MIME objects in Gnus if immediate upgrade is not feasible.

How to confirm the fix worked

Verify the installed Emacs version is 25.3 or newer; test by sending a benign enriched email and confirming that x-display tags are no longer executed.

Typical attack path

  1. Craft email with malicious text/enriched MIME body containing x-display XML element
  2. Deliver message via SMTP or Usenet to target user
  3. Victim opens or previews the message inside vulnerable Emacs
  4. Emacs parses the enriched content and executes the embedded shell commands
  5. Attacker obtains code execution on the victim workstation

How to detect it

Review mail server logs and user mailboxes for messages with Content-Type: text/enriched headers; inspect Emacs process creation events or shell history for unexpected commands triggered during email preview.

  • Content-Type: text/enriched
  • x-display
  • enriched.el
  • mm-view.el

What your security team should do

  • Identify all Emacs 25.2 and earlier installations across the environment and schedule upgrades
  • Block or quarantine inbound email containing text/enriched content type until patches are applied
  • Add version checks for Emacs to vulnerability scanning and asset inventory processes

The record

GNU Emacs before 25.3 allows remote attackers to execute arbitrary code via email with crafted "Content-Type: text/enriched" data containing an x-display XML element that specifies execution of shell commands, related to an unsafe text/enriched extension in lisp/textmodes/enriched.el, and unsafe Gnus support for enriched and richtext inline MIME objects in lisp/gnus/mm-view.el. In particular, an Emacs user can be instantly compromised by reading a crafted email message (or Usenet news article).

Affected packages

Ecosystem Package Introduced Fixed
Debian:7 emacs23 0 23.4+1-4+deb7u1
Debian:8 emacs24 0 24.4+1-5+deb8u1
Debian:9 emacs24 0 24.5+1-11+deb9u1
Debian:9 emacs25 0 25.1+1-4+deb9u1
Mageia:5 emacs 0 24.3-10.1.mga5
Mageia:6 emacs 0 24.5-8.1.mga6
Red Hat:enterprise_linux:7::client emacs 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::client emacs-common 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::client emacs-debuginfo 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::client emacs-el 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::client emacs-filesystem 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::client emacs-nox 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::client emacs-terminal 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::computenode emacs 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::computenode emacs-common 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::computenode emacs-debuginfo 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::computenode emacs-el 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::computenode emacs-filesystem 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::computenode emacs-nox 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::computenode emacs-terminal 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::server emacs 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::server emacs-common 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::server emacs-debuginfo 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::server emacs-el 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::server emacs-filesystem 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::server emacs-nox 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::server emacs-terminal 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::workstation emacs 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::workstation emacs-common 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::workstation emacs-debuginfo 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::workstation emacs-el 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::workstation emacs-filesystem 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::workstation emacs-nox 0 1:24.3-20.el7_4
Red Hat:enterprise_linux:7::workstation emacs-terminal 0 1:24.3-20.el7_4
SUSE:Linux Enterprise Desktop 12 SP2 emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Desktop 12 SP3 emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Point of Sale 11 SP3 emacs 0 22.3-42.3.1
SUSE:Linux Enterprise Server 11 SP3-LTSS emacs 0 22.3-42.3.1
SUSE:Linux Enterprise Server 11 SP3-TERADATA emacs 0 22.3-42.3.1
SUSE:Linux Enterprise Server 11 SP4 emacs 0 22.3-42.3.1
SUSE:Linux Enterprise Server 12 SP1-LTSS emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Server 12 SP2 emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Server 12 SP3 emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Server 12-LTSS emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Server for SAP Applications 11 SP4 emacs 0 22.3-42.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP2 emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 emacs 0 24.3-25.3.1
SUSE:Linux Enterprise Software Development Kit 11 SP4 emacs 0 22.3-42.3.1
SUSE:OpenStack Cloud 6 emacs 0 24.3-25.3.1
Ubuntu:14.04:LTS emacs24 0 24.3+1-2ubuntu1.1
Ubuntu:16.04:LTS emacs24 0 24.5+1-6ubuntu1.1
Ubuntu:18.04:LTS emacs25 0 25.2+1-6

Related vulnerabilities