Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2018-0802: Microsoft Office Equation Editor Stack Buffer Overflow RCE

Published Jan 10, 2018 · Updated 3 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS7.8High · v3.1
EPSS93.3%100th percentile
CISA KEVYesAdded Nov 3, 2021
In the wildActivePer CISA KEV
Vendor
Microsoft Corporation
IdentifiersCVE-2018-0802CWE-121

CVE-2018-0802 is a stack-based buffer overflow in Microsoft Equation Editor affecting Microsoft Office 2007, 2010, 2013, and 2016. During parsing of a MathType Equation Format (MTEF) Font Record in an embedded equation object, an unchecked strcpy operation copies an attacker-controlled font name into the 32-byte lfFaceName field of a stack-allocated LOGFONT structure. An oversized font name can overwrite the calling function's return address and redirect execution to attacker-controlled code. Observed exploits used partial return-address overwrites to circumvent ASLR. Opening a specially crafted Office document can trigger arbitrary code execution in the current user's security context. The vulnerability is distinct from CVE-2017-11882, despite affecting the same legacy component.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation compromises the affected endpoint with the privileges of the user opening the document. Attackers can execute commands, install malware, access or modify user-accessible data, and establish a foothold for further intrusion. Exploitation has delivered information stealers, downloaders, and espionage backdoors, including Agent Tesla, Elise, and PLEAD. The vulnerability is actively exploited and has known ransomware campaign use. Administrative access and lateral movement are possible follow-on outcomes but are not inherently granted by the vulnerability.

Mitigation

If you can’t patch tonight, do this now.

Block or disarm untrusted embedded OLE objects and inspect or quarantine exploit-bearing Office and RTF attachments. Restrict Office child-process creation and unnecessary outbound connections, and use endpoint protection and behavioral monitoring to detect exploitation and payload execution. Apply least privilege, application control, and network segmentation to limit post-exploitation impact. Where immediate patching is impractical, use virtual patching and prevent vulnerable systems from processing untrusted documents.

Remediation

Patch, then assume compromise.

Apply Microsoft's security updates addressing CVE-2018-0802 to affected Office installations and verify deployment across endpoints, including legacy systems. An installation patched only for CVE-2017-11882 should not be considered protected against this vulnerability. Replace unsupported Office installations with supported, fully updated versions. If exploitation is suspected, isolate the endpoint and investigate for installed payloads, persistence, credential theft, and subsequent attacker activity; patching alone does not remove an existing compromise.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.

View more in app →
CVE-2018-0802_POCThis repository is a proof-of-concept (PoC) exploit for CVE-2018-0802, a vulnerability in Microsoft Office's Equation Editor that allows for arbitrary code execution via a crafted RTF file. The repository contains three files: a README with usage instructions, a sample malicious RTF file ('cve-2018-0802.rtf'), and a Python script ('cve-2018-0802_poc.py') that generates malicious RTF files. The Python script takes an executable command (such as 'calc.exe' or a remote executable path) and outputs an RTF file that, when opened in a vulnerable version of Microsoft Word, will execute the specified command. The exploit leverages the embedding of an OLE object with a crafted Equation.3 object to trigger the vulnerability. The main attack vector is through a malicious file delivered to the victim, and the payload is customizable to execute arbitrary commands. The exploit is a PoC and does not include advanced features such as evasion or persistence.zldww2011 · Disclosed Jan 11, 2018 · python · filePoCCVE-2018-0802This repository provides a proof-of-concept exploit for CVE-2018-0802 (and optionally CVE-2017-11882), both critical vulnerabilities in the Microsoft Office Equation Editor. The main exploit script, 'packager_exec_CVE-2018-0802.py', generates a malicious RTF file that embeds a user-supplied executable using a Packager OLE object. When the RTF is opened in a vulnerable version of Microsoft Office, the exploit drops the embedded executable to the %TMP% directory and executes it via a WinExec call, achieving arbitrary code execution. The script supports an option to exploit both CVE-2018-0802 and CVE-2017-11882 in a single document. The repository also includes a sample malicious RTF ('example/example.rtf') that launches calc.exe, YARA rules for detection of the exploit, and a utility script ('yara/strip_keycodes.py') for removing obfuscating keycodes from RTF files. The exploit is a POC and requires the attacker to supply the payload executable. The attack vector is via malicious file delivery (RTF), and the main fingerprintable endpoint is the dropped file in the %TMP% directory.rxwx · Disclosed Jan 11, 2018 · python · yara · filePoCRTF_11882_0802This repository contains a Python proof-of-concept exploit for the Microsoft Office Equation Editor vulnerabilities CVE-2017-11882 and CVE-2018-0802. The main file, RTF_11882_0802.py, is a command-line tool that generates a malicious RTF file. The user specifies a command to execute on the target system and the output file name for the crafted RTF. Optionally, a template RTF can be provided. The exploit works by embedding a specially crafted OLE object into the RTF, which triggers the vulnerability in the Equation Editor component when the file is opened in a vulnerable version of Microsoft Office on Windows. The exploit does not contain any hardcoded payload; instead, it allows the user to specify any command, making it a flexible proof-of-concept. The repository also includes a README with usage instructions and references to research and advisories. No network endpoints or external IPs/domains are present; the attack vector is via a malicious file delivered to the victim.Ridter · Disclosed Jan 12, 2018 · python · filePoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Microsoft CorporationMicrosoft Officeapplication
Microsoft CorporationOffice Compatibility Packapplication
Microsoft CorporationWordapplication
FAQ

Frequently asked questions

Is CVE-2018-0802 exploited in the wild?
Yes. As of Nov 25, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 3, 2021.
Is there a public exploit for CVE-2018-0802?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2018-0802, the earliest disclosed Jan 11, 2018.
Is there a patch for CVE-2018-0802?
Apply Microsoft's security updates addressing CVE-2018-0802 to affected Office installations and verify deployment across endpoints, including legacy systems. An installation patched only for CVE-2017-11882 should not be considered protected against this vulnerability.
What products are affected by CVE-2018-0802?
Microsoft Corporation Microsoft Office, Microsoft Corporation Office Compatibility Pack, and Microsoft Corporation Word.
How severe is CVE-2018-0802?
CVE-2018-0802 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 93.3% (100th percentile) as of Nov 25, 2026.
Activity feed

Recent activity

90 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+55 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence49Every report linking this CVE to a named adversary.
Associated malware63Malware families linked to this CVE, with evidence and IOCs.
Detection signatures2YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity28Community discussion across Reddit, Mastodon, and other social sources.