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-2021-23017

CVE-2021-23017: F5 Nginx Buffer Overflow Vulnerability

CVE-2021-23017 is a buffer overflow flaw in F5 Nginx resolver that allows attackers to forge DNS packets, causing memory overwrite and worker process crashes. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2021-23017 Overview

A security vulnerability exists in the nginx resolver component that allows an attacker capable of forging UDP packets from a DNS server to cause a 1-byte memory overwrite. This off-by-one error (CWE-193) can result in worker process crashes or potentially enable more severe exploitation scenarios including arbitrary code execution.

Critical Impact

Network-accessible vulnerability in nginx resolver enables memory corruption through forged DNS responses, potentially leading to denial of service or remote code execution on affected web servers.

Affected Products

  • F5 Nginx (multiple versions)
  • OpenResty
  • Fedora 33 and 34
  • NetApp ONTAP Select Deploy Administration Utility
  • Oracle Blockchain Platform
  • Oracle Communications Control Plane Monitor (versions 3.4, 4.2, 4.3, 4.4)
  • Oracle Communications Fraud Monitor
  • Oracle Communications Operations Monitor (versions 3.4, 4.2, 4.3, 4.4)
  • Oracle Communications Session Border Controller (versions 8.4, 9.0)
  • Oracle Enterprise Communications Broker (version 3.3.0)
  • Oracle Enterprise Session Border Controller (versions 8.4, 9.0)
  • Oracle Enterprise Telephony Fraud Monitor (versions 3.4, 4.2, 4.3, 4.4)
  • Oracle GoldenGate

Discovery Timeline

  • 2021-06-01 - CVE-2021-23017 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-23017

Vulnerability Analysis

This vulnerability affects the DNS resolver functionality within nginx. When nginx is configured to use DNS resolution (via the resolver directive), it processes DNS response packets from configured DNS servers. The flaw exists in how nginx handles these DNS responses, specifically in the parsing of DNS labels.

The vulnerability is classified as an off-by-one error (CWE-193), where a boundary calculation error leads to writing a single byte beyond the intended buffer boundary. While a 1-byte overwrite may seem limited in scope, memory corruption vulnerabilities of this nature can be leveraged by sophisticated attackers to achieve more significant impact, including arbitrary code execution under certain memory layout conditions.

The attack requires the adversary to position themselves as a man-in-the-middle or compromise/spoof the DNS server that nginx queries. This network-based attack vector means any nginx instance performing DNS resolution and exposed to potentially malicious DNS traffic is at risk.

Root Cause

The root cause is an off-by-one error in the nginx resolver code when processing DNS response packets. Specifically, the vulnerability occurs during the handling of DNS name compression pointers or label length calculations. The boundary check fails to properly account for all bytes, resulting in a write operation that exceeds the allocated buffer by exactly one byte.

This type of error typically occurs when:

  • Loop termination conditions are incorrect (using <= instead of < or vice versa)
  • Buffer size calculations don't account for null terminators or length bytes
  • Pointer arithmetic errors in DNS label decompression routines

Attack Vector

The attack vector is network-based and exploits the DNS resolution process. An attacker must be able to inject or forge UDP packets that appear to originate from a legitimate DNS server. This can be accomplished through:

  1. DNS Server Compromise: Gaining control of a DNS server configured in nginx's resolver directive
  2. Man-in-the-Middle Attack: Intercepting and modifying DNS traffic between nginx and legitimate DNS servers
  3. DNS Spoofing: Sending forged UDP packets with spoofed source IP addresses matching the configured DNS server

Once positioned, the attacker crafts a malicious DNS response containing specifically structured data that triggers the off-by-one write. The 1-byte overwrite corrupts adjacent memory, which can cause the nginx worker process to crash (denial of service) or, in more sophisticated attacks, may be chained with other techniques to achieve code execution.

The vulnerability is particularly concerning because:

  • DNS queries often occur during normal proxy operations
  • UDP-based DNS is susceptible to spoofing attacks
  • Many nginx deployments use the resolver directive for dynamic upstream resolution

Detection Methods for CVE-2021-23017

Indicators of Compromise

  • Unexpected nginx worker process crashes or restarts, particularly when processing requests requiring DNS resolution
  • Anomalous DNS response packets with unusual label structures or sizes in network traffic captures
  • Memory corruption indicators in nginx error logs or core dumps showing heap/buffer corruption patterns
  • Unusual DNS traffic patterns from unexpected source addresses targeting nginx servers

Detection Strategies

  • Monitor nginx error logs for segmentation faults, worker process crashes, or memory-related errors occurring during DNS resolution
  • Implement network-based detection rules to identify malformed DNS responses with suspicious label lengths or compression pointers
  • Deploy intrusion detection signatures matching known exploitation patterns for CVE-2021-23017 (reference the Packet Storm DoS Report for indicators)
  • Use runtime application self-protection (RASP) or memory protection tools to detect buffer overflows in nginx processes

Monitoring Recommendations

  • Enable nginx debug logging for resolver operations when investigating potential compromise
  • Configure SIEM alerts for nginx worker process restart frequency exceeding baseline thresholds
  • Monitor DNS query/response traffic for anomalies in packet size, response timing, or source authenticity
  • Implement DNS traffic validation at network perimeter to filter obviously malformed responses

How to Mitigate CVE-2021-23017

Immediate Actions Required

  • Upgrade nginx to a patched version immediately; refer to the Nginx Security Announcement for fixed versions
  • If using OpenResty, apply vendor patches as documented in their security advisories
  • Review and restrict DNS resolver configurations to trusted internal DNS servers only
  • Implement network segmentation to limit potential DNS spoofing attack surfaces

Patch Information

F5/nginx has released security patches addressing this vulnerability. The fix corrects the boundary calculation error in the DNS resolver code, ensuring proper buffer size validation during DNS response processing.

For Oracle products, consult the following security advisories for patched versions:

  • Oracle Security Alert October 2021
  • Oracle Security Alert January 2022
  • Oracle Security Alert April 2022

For NetApp products, review the NetApp Security Advisory. Fedora users should apply updates via standard package management as documented in the Fedora Package Announcements.

Workarounds

  • Remove or comment out resolver directives in nginx configuration if dynamic DNS resolution is not required for your deployment
  • Use static upstream IP addresses instead of hostnames to eliminate DNS resolution dependency
  • Deploy DNS traffic filtering at network boundaries to validate DNS response authenticity and structure
  • Consider using DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT) to encrypted DNS servers to prevent response forgery
bash
# Configuration example - Remove resolver dependency if not needed
# In nginx.conf, comment out or remove:
# resolver 8.8.8.8;

# Use static IP addresses for upstreams instead of hostnames:
upstream backend {
    server 192.168.1.10:8080;
    server 192.168.1.11:8080;
}

# If resolver is required, restrict to trusted internal DNS:
resolver 10.0.0.53 valid=30s ipv6=off;

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechNginx

  • SeverityHIGH

  • CVSS Score7.7

  • EPSS Probability75.24%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-193
  • Technical References
  • Packet Storm DoS Report

  • Apache API Notifications Update

  • Apache API Notifications Update

  • Apache API Notifications Update

  • Apache API Notifications Update

  • Apache API Notifications Update

  • Fedora Package Announcement

  • Fedora Package Announcement

  • NetApp Security Advisory

  • F5 Support Article
  • Vendor Resources
  • Nginx Announcements

  • Oracle Security Alert April 2022

  • Oracle Security Alert January 2022

  • Oracle Security Alert October 2021
  • Related CVEs
  • CVE-2026-27654: F5 Nginx Plus Buffer Overflow Vulnerability

  • CVE-2021-46461: Nginx Njs Buffer Overflow Vulnerability

  • CVE-2026-33029: Nginx UI Denial of Service Vulnerability

  • CVE-2026-33028: Nginx UI Race Condition 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