The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2020-28021

CVE-2020-28021: Exim Mail Server RCE Vulnerability

CVE-2020-28021 is a remote code execution vulnerability in Exim mail server that allows authenticated SMTP clients to execute arbitrary code as root. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2020-28021 Overview

CVE-2020-28021 is a critical vulnerability in Exim mail transfer agent (MTA) versions prior to 4.94.2 that allows authenticated remote attackers to achieve remote code execution with root privileges. The vulnerability stems from improper neutralization of line delimiters in the SMTP authentication process, enabling attackers to inject malicious content into spool files through carefully crafted AUTH= parameters in MAIL FROM commands.

Critical Impact

Authenticated attackers can achieve remote code execution as root on vulnerable Exim mail servers, potentially compromising the entire mail infrastructure and any connected systems.

Affected Products

  • Exim versions prior to 4.94.2
  • Systems running vulnerable Exim configurations with SMTP authentication enabled

Discovery Timeline

  • 2021-05-06 - CVE-2020-28021 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-28021

Vulnerability Analysis

This vulnerability exploits a fundamental flaw in how Exim handles line delimiters within the AUTH= parameter of MAIL FROM SMTP commands. When an authenticated SMTP client sends a message, Exim stores session information including authentication details in spool files. The failure to properly sanitize newline characters (\n, \r\n) in the authentication parameter allows attackers to inject arbitrary content into these spool files.

The injected content can include Exim-specific header directives or malicious data that, when processed by Exim's delivery mechanisms, leads to arbitrary command execution with root privileges. This is particularly dangerous because Exim typically runs with elevated privileges to handle mail delivery operations.

Root Cause

The root cause of CVE-2020-28021 lies in insufficient input validation within Exim's SMTP command parsing logic. Specifically, the code responsible for handling the AUTH= parameter in MAIL FROM commands fails to neutralize or escape line delimiter characters before writing authentication data to spool files. This improper neutralization of line delimiters (CWE category) enables injection attacks that can modify the structure and content of spool files in ways the developers never intended.

Attack Vector

The attack requires network access to a vulnerable Exim server and valid SMTP authentication credentials. An attacker establishes an authenticated SMTP session and crafts a MAIL FROM command containing newline characters within the AUTH= parameter. When Exim processes this command, it writes the malicious content to a spool file without proper sanitization.

The injected lines can manipulate how Exim interprets the spool file during message delivery, potentially executing arbitrary commands with root privileges. This network-based attack vector with low complexity requirements makes it particularly dangerous for internet-facing mail servers.

Detection Methods for CVE-2020-28021

Indicators of Compromise

  • Unusual or malformed spool files in Exim's spool directory containing unexpected newline sequences
  • Authentication log entries with suspicious AUTH= parameters containing encoded newline characters
  • Unexpected process execution originating from Exim's delivery processes
  • Anomalous root-level command execution correlated with mail delivery activities

Detection Strategies

  • Monitor SMTP traffic for MAIL FROM commands containing encoded newline characters (%0A, %0D, \n, \r) in the AUTH= parameter
  • Implement file integrity monitoring on Exim spool directories to detect unexpected modifications
  • Deploy network intrusion detection rules to identify malicious SMTP command patterns
  • Review Exim logs for authentication anomalies and suspicious command sequences

Monitoring Recommendations

  • Enable verbose logging in Exim to capture full SMTP transaction details for forensic analysis
  • Configure SIEM alerts for anomalous authentication patterns to Exim mail servers
  • Monitor for unexpected child processes spawned by Exim delivery agents
  • Track changes to Exim configuration files and spool directories using host-based intrusion detection

How to Mitigate CVE-2020-28021

Immediate Actions Required

  • Upgrade Exim to version 4.94.2 or later immediately to address this vulnerability
  • Restrict SMTP authentication to trusted networks until patching is complete
  • Review access controls for mail servers and limit exposure to untrusted networks
  • Audit authentication logs for signs of exploitation attempts

Patch Information

Exim has released version 4.94.2 which addresses CVE-2020-28021 by implementing proper sanitization of line delimiters in the AUTH= parameter handling. Organizations should obtain the patched version from the official Exim distribution channels and apply the update following standard change management procedures.

For detailed technical information about this vulnerability and the fix, refer to the Exim Security Advisory CVE-2020-28021.

Workarounds

  • Temporarily disable SMTP authentication if operationally feasible until patches can be applied
  • Implement network-level filtering to block SMTP commands containing suspicious newline-encoded patterns
  • Use a reverse proxy or mail security gateway to sanitize incoming SMTP traffic before it reaches Exim
  • Restrict SMTP authentication to internal networks only through firewall rules
bash
# Example: Restrict SMTP AUTH to trusted networks in Exim configuration
# Add to exim.conf to limit AUTH to specific IP ranges
hostlist trusted_smtp_hosts = 10.0.0.0/8 : 192.168.0.0/16

acl_check_auth:
  deny
    ! hosts = +trusted_smtp_hosts
    message = SMTP AUTH not permitted from your network
  accept

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechExim

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability7.88%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • NVD-CWE-Other
  • Vendor Resources
  • Exim Security Advisory CVE-2020-28021
  • Related CVEs
  • CVE-2023-42116: Exim SMTP Buffer Overflow RCE Vulnerability

  • CVE-2023-42118: Libspf2 Integer Underflow RCE Vulnerability

  • CVE-2023-42115: Exim AUTH Out-Of-Bounds Write RCE Flaw

  • CVE-2020-28026: Exim Mail Server RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English