Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-27840

CVE-2020-27840: Samba Denial of Service Vulnerability

CVE-2020-27840 is a denial of service vulnerability in Samba that causes crashes through improper handling of spaces in domain name strings. This article covers the technical details, affected versions, and mitigation strategies.

Published: March 4, 2026

CVE-2020-27840 Overview

A heap-based out-of-bounds write vulnerability was discovered in Samba's handling of domain name (DN) strings. The flaw occurs when spaces are used around a domain name in LDAP requests. While these spaces should be ignored during processing, malformed DN strings containing spaces can trigger a condition where a zero-byte is written into out-of-bounds memory. This memory corruption results in a crash of the Samba service, causing a denial of service condition.

Critical Impact

This vulnerability allows unauthenticated remote attackers to crash Samba servers by sending specially crafted LDAP requests, causing service disruption to enterprise file sharing and Active Directory domain services.

Affected Products

  • Samba (multiple versions)
  • Debian Linux 9.0, 10.0
  • Fedora 32, 33, 34

Discovery Timeline

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

Technical Details for CVE-2020-27840

Vulnerability Analysis

This vulnerability is classified as CWE-125 (Out-of-Bounds Read), though the actual impact involves an out-of-bounds write condition. The flaw resides in Samba's LDAP server component, specifically in the code responsible for parsing Distinguished Name (DN) strings used in LDAP operations.

The vulnerability occurs when the DN parser encounters strings with spaces around domain name components. The parsing logic should normalize these strings by ignoring extraneous whitespace, but a boundary condition error causes the parser to miscalculate buffer boundaries. When processing malformed input, the code writes a null byte (zero-byte) beyond the allocated memory region, corrupting heap memory and causing the Samba daemon to crash.

The attack requires no authentication and can be executed remotely over the network. An attacker needs only network access to the Samba LDAP service (typically port 389 or 636 for LDAPS) to exploit this vulnerability. While the vulnerability does not allow code execution or information disclosure, repeated exploitation can effectively deny service to legitimate users relying on Samba for file sharing or Active Directory services.

Root Cause

The root cause is improper boundary checking in the DN string parsing routines when handling whitespace characters. The code fails to properly validate buffer boundaries when normalizing DN strings that contain spaces around domain components, resulting in an out-of-bounds memory write when processing malformed input.

Attack Vector

The attack vector is network-based and requires no user interaction or authentication. An attacker can exploit this vulnerability by sending specially crafted LDAP requests containing malformed DN strings with strategic placement of space characters around domain name components. The malformed DN causes the parser to write outside allocated memory boundaries, triggering a crash.

The vulnerability can be exploited by crafting LDAP bind or search requests with DN values containing spaces that trigger the parsing flaw. For detailed technical information, refer to the Samba CVE-2020-27840 Security Notice.

Detection Methods for CVE-2020-27840

Indicators of Compromise

  • Samba daemon (smbd, nmbd, or samba-ad-dc) crashes or unexpected restarts
  • LDAP service unavailability or intermittent connectivity issues
  • Segmentation fault entries in Samba logs associated with LDAP operations
  • Unusual LDAP requests containing malformed DN strings with excessive whitespace

Detection Strategies

  • Monitor Samba process stability and implement alerting for unexpected daemon restarts
  • Analyze LDAP traffic for malformed DN strings containing unusual whitespace patterns
  • Deploy intrusion detection rules to identify LDAP requests with suspicious DN formatting
  • Review system logs for segmentation fault signals related to Samba processes

Monitoring Recommendations

  • Enable verbose logging for Samba LDAP operations to capture potential exploitation attempts
  • Implement network monitoring for LDAP traffic anomalies on ports 389 and 636
  • Configure process monitoring to alert on Samba daemon crashes
  • Establish baseline metrics for LDAP service availability to detect denial of service conditions

How to Mitigate CVE-2020-27840

Immediate Actions Required

  • Update Samba to the latest patched version available for your distribution
  • Apply security updates from your Linux distribution's package repository
  • Review firewall rules to restrict LDAP access to trusted networks only
  • Consider temporarily disabling LDAP services if immediate patching is not possible

Patch Information

Samba has released security patches to address this vulnerability. Users should update to patched versions as specified in the Samba CVE-2020-27840 Security Notice. Distribution-specific patches are available:

  • Debian: DSA-4884 and Debian LTS Announcement
  • Fedora: Updates available via Fedora package announcements for Fedora 32, 33, and 34
  • Gentoo: GLSA 202105-22
  • NetApp: Security Advisory ntap-20210326-0007

Workarounds

  • Implement network segmentation to limit LDAP service exposure to trusted clients only
  • Deploy a firewall or access control list to restrict access to Samba LDAP ports (389/636)
  • Consider using VPN or other secure channels for LDAP access if external access is required
  • Monitor for exploitation attempts while patches are being deployed
bash
# Restrict LDAP access using iptables
# Allow LDAP only from trusted network (example: 10.0.0.0/8)
iptables -A INPUT -p tcp --dport 389 -s 10.0.0.0/8 -j ACCEPT
iptables -A INPUT -p tcp --dport 636 -s 10.0.0.0/8 -j ACCEPT
iptables -A INPUT -p tcp --dport 389 -j DROP
iptables -A INPUT -p tcp --dport 636 -j DROP

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechSamba

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability17.98%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-125
  • Technical References
  • Red Hat Bug Report #1941400

  • Debian LTS Announcement March 2021

  • Fedora Package Announcement 1

  • Fedora Package Announcement 2

  • Fedora Package Announcement 3

  • Gentoo GLSA 2021-05-22

  • NetApp Security Advisory ntap-20210326-0007

  • Debian Security Advisory DSA-4884
  • Vendor Resources
  • Samba CVE-2020-27840 Security Notice
  • Related CVEs
  • CVE-2022-32745: Samba Samba DOS Vulnerability

  • CVE-2022-0336: Samba AD DC SPN Bypass DoS Vulnerability

  • CVE-2021-20277: Samba LDAP Denial of Service Vulnerability

  • CVE-2020-14323: Samba Winbind Service DoS Vulnerability
Default Legacy - Prefooter | 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