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

CVE-2021-42697: Akka HTTP Server DOS Vulnerability

CVE-2021-42697 is a denial of service flaw in Akka HTTP Server caused by stack exhaustion during HTTP header parsing. Attackers exploit deeply nested comments in User-Agent headers. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: February 25, 2026

CVE-2021-42697 Overview

CVE-2021-42697 is a Denial of Service (DoS) vulnerability affecting Akka HTTP, a popular HTTP library for building RESTful services in Scala and Java. The vulnerability exists in the HTTP header parsing functionality, where maliciously crafted User-Agent headers containing deeply nested comments can trigger stack exhaustion, causing the server to crash.

Akka HTTP versions 10.1.x before 10.1.15 and 10.2.x before 10.2.7 are susceptible to this attack. The flaw stems from recursive parsing of HTTP header comments, which lacks proper depth limits. An unauthenticated remote attacker can exploit this vulnerability by sending specially crafted HTTP requests to vulnerable servers, resulting in service disruption without requiring any user interaction or authentication.

Critical Impact

Remote attackers can crash Akka HTTP servers by sending a single malicious HTTP request with a deeply nested User-Agent header, causing complete service unavailability.

Affected Products

  • Akka HTTP Server versions 10.1.x before 10.1.15
  • Akka HTTP Server versions 10.2.x before 10.2.7

Discovery Timeline

  • 2021-11-02 - CVE-2021-42697 published to NVD
  • 2021-11-02 - Akka releases security patch version 10.2.7
  • 2021-11-22 - Akka releases security patch version 10.1.15
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-42697

Vulnerability Analysis

This vulnerability is classified as CWE-674 (Uncontrolled Recursion), where the Akka HTTP header parsing implementation recursively processes nested comment structures without enforcing adequate recursion depth limits. When parsing HTTP headers such as User-Agent, the parser encounters parentheses which denote comments according to HTTP specifications. Each nested comment level triggers an additional stack frame during recursive processing.

The attack can be executed remotely over the network without requiring any privileges or user interaction. The impact is limited to availability, with no effect on confidentiality or integrity. The vulnerability has a high likelihood of exploitation, as indicated by its EPSS percentile placing it among the most likely to be exploited vulnerabilities.

Root Cause

The root cause lies in the recursive comment parsing logic within Akka HTTP's header parser. HTTP headers allow comments enclosed in parentheses, and these comments can be nested. The parser implementation uses recursive function calls to handle each nesting level without implementing a maximum depth check. When an attacker sends a User-Agent header with thousands of nested parentheses, the recursive calls consume stack space until the JVM stack is exhausted, throwing a StackOverflowError and crashing the server process.

Attack Vector

The attack is conducted over the network by sending an HTTP request containing a User-Agent header with deeply nested comment structures. Since HTTP headers are processed before any application logic, no authentication is required. A single malicious request is sufficient to crash the server.

The attacker crafts a User-Agent header with multiple levels of nested parentheses. For example, a header like User-Agent: Mozilla/5.0 ((((...thousands of nested parens...)))) would trigger recursive parsing. Each opening parenthesis causes the parser to recurse deeper, and with sufficient nesting depth (typically several thousand levels), the JVM stack is exhausted.

The attack has been publicly documented with a proof-of-concept available on Packet Storm, making exploitation straightforward for attackers.

Detection Methods for CVE-2021-42697

Indicators of Compromise

  • HTTP requests containing User-Agent headers with abnormally long values or excessive parentheses
  • Server crashes or restarts correlated with incoming HTTP traffic
  • StackOverflowError exceptions in JVM application logs
  • Sudden service unavailability without apparent infrastructure issues

Detection Strategies

  • Monitor web server logs for User-Agent headers exceeding normal length thresholds (e.g., > 8KB)
  • Implement regex-based detection for headers containing excessive nested parentheses patterns
  • Configure application performance monitoring to alert on StackOverflowError occurrences
  • Deploy Web Application Firewall (WAF) rules to block requests with malformed or suspiciously long headers

Monitoring Recommendations

  • Set up alerting for JVM crashes with stack overflow patterns in application logs
  • Monitor HTTP request header sizes at the load balancer or reverse proxy level
  • Track server availability metrics and correlate downtime with traffic anomalies
  • Implement logging of rejected or sanitized malformed HTTP headers

How to Mitigate CVE-2021-42697

Immediate Actions Required

  • Upgrade Akka HTTP 10.2.x installations to version 10.2.7 or later
  • Upgrade Akka HTTP 10.1.x installations to version 10.1.15 or later
  • If immediate patching is not possible, deploy WAF rules to filter requests with excessively long User-Agent headers
  • Consider implementing request header size limits at the reverse proxy or load balancer

Patch Information

Akka has released patched versions addressing this vulnerability. Users should upgrade to the following versions:

  • Akka HTTP 10.2.x: Upgrade to version 10.2.7 or later - See the Akka HTTP 10.2.7 Release Announcement for details
  • Akka HTTP 10.1.x: Upgrade to version 10.1.15 or later - See the Akka HTTP 10.1.15 Release Announcement for details

For complete technical details on the vulnerability and remediation, refer to the official Akka HTTP CVE-2021-42697 Documentation.

Workarounds

  • Deploy a reverse proxy (e.g., Nginx, HAProxy) in front of Akka HTTP servers with header size limits
  • Implement WAF rules to block requests containing User-Agent headers longer than 4096 bytes
  • Configure network-level rate limiting to reduce the impact of DoS attempts
  • Monitor and automatically restart crashed Akka HTTP instances while patching is in progress
bash
# Example Nginx configuration to limit header sizes
# Add to http or server block
large_client_header_buffers 4 8k;
client_header_buffer_size 1k;

# Block requests with excessively long User-Agent headers
if ($http_user_agent ~* "^.{4096,}$") {
    return 403;
}

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechAkka Http Server

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability75.54%

  • 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-674
  • Technical References
  • Packet Storm DoS Exploit
  • Vendor Resources
  • Akka Blog Post

  • Akka HTTP Release Announcement

  • Akka HTTP Release Announcement

  • Akka HTTP CVE-2021-42697 Documentation
  • Latest CVEs
  • CVE-2025-52793: Esselink.nu Settings CSRF Vulnerability

  • CVE-2025-52772: Virtual Moderator CSRF Vulnerability

  • CVE-2025-48279: WC MyParcel Belgium XSS Vulnerability

  • CVE-2025-39381: KiotViet Sync CSRF 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