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-2026-34519

CVE-2026-34519: AIOHTTP XSS Vulnerability

CVE-2026-34519 is a cross-site scripting vulnerability in AIOHTTP, an asynchronous HTTP framework for Python. Attackers can inject headers via the reason parameter. This article covers technical details, affected versions, and patches.

Published: April 2, 2026

CVE-2026-34519 Overview

AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. A vulnerability exists in versions prior to 3.13.4 where an attacker who controls the reason parameter when creating a Response object may be able to inject extra headers through HTTP Response Splitting. This occurs due to insufficient validation of newline and carriage return characters in the status line, enabling the injection of arbitrary HTTP headers into responses.

Critical Impact

Applications using AIOHTTP that pass untrusted input to the Response reason parameter may be vulnerable to HTTP Response Splitting attacks, potentially enabling cache poisoning, session hijacking, or cross-site scripting through injected headers.

Affected Products

  • AIOHTTP versions prior to 3.13.4
  • Python applications using vulnerable AIOHTTP releases
  • Asyncio-based web services with user-controllable response reason parameters

Discovery Timeline

  • 2026-04-01 - CVE CVE-2026-34519 published to NVD
  • 2026-04-01 - Last updated in NVD database

Technical Details for CVE-2026-34519

Vulnerability Analysis

This vulnerability is classified under CWE-113 (Improper Neutralization of CRLF Sequences in HTTP Headers), commonly known as HTTP Response Splitting. The flaw exists in AIOHTTP's HTTP response serialization logic, specifically in how the status line reason phrase is processed before being written to the output buffer.

When constructing HTTP responses, the framework failed to validate that the reason parameter does not contain newline (\n) or carriage return (\r) characters. An attacker with control over this parameter could inject CRLF sequences followed by arbitrary HTTP headers, effectively splitting the response and injecting malicious content.

HTTP Response Splitting can lead to various downstream attacks including cache poisoning, where malicious responses are cached by intermediary proxies, and header injection attacks that could manipulate browser behavior through injected headers like Set-Cookie or Location.

Root Cause

The root cause lies in the _write_str function within aiohttp/_http_writer.pyx and the _py_serialize_headers function in aiohttp/http_writer.py. These functions wrote the status line directly to the output buffer without checking for embedded CRLF characters. The status line, which includes the reason phrase, was trusted to be safe for direct inclusion in the HTTP response.

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker must have control over the reason parameter value passed to the AIOHTTP Response constructor. This could occur in scenarios where the application dynamically constructs response reason phrases based on user input or external data sources. By injecting CRLF sequences (\r\n) followed by additional header lines, an attacker can append arbitrary headers to the HTTP response.

text
    _init_writer(&writer, buf)

    try:
-        if _write_str(&writer, status_line) < 0:
+        if _write_str_raise_on_nlcr(&writer, status_line) < 0:
             raise
        if _write_byte(&writer, b'\r') < 0:
             raise

Source: GitHub Commit Change

The patch introduces a new function _write_str_raise_on_nlcr that validates the status line does not contain newline or carriage return characters before writing, raising an exception if invalid characters are detected.

python


def _py_serialize_headers(status_line: str, headers: "CIMultiDict[str]") -> bytes:
+    _safe_header(status_line)
    headers_gen = (_safe_header(k) + ": " + _safe_header(v) for k, v in headers.items())
    line = status_line + "\r\n" + "\r\n".join(headers_gen) + "\r\n\r\n"
    return line.encode("utf-8")

Source: GitHub Commit Change

The Python implementation now applies _safe_header validation to the status line, ensuring CRLF characters are properly rejected.

Detection Methods for CVE-2026-34519

Indicators of Compromise

  • HTTP responses containing unexpected headers not set by the application
  • Log entries showing reason phrases with encoded or unusual characters (%0d, %0a, \r, \n)
  • Cache entries with suspicious or malformed HTTP responses
  • Reports of session hijacking or unexpected cookie behavior from users

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect CRLF sequences in request parameters that may influence response construction
  • Monitor application logs for errors related to malformed HTTP responses or header serialization failures
  • Use static analysis tools to identify code paths where user input reaches the Response reason parameter
  • Deploy runtime application self-protection (RASP) to detect and block HTTP response splitting attempts

Monitoring Recommendations

  • Enable verbose logging on HTTP response generation to capture reason phrase values
  • Monitor for anomalous HTTP response sizes that may indicate injected headers
  • Set up alerts for repeated serialization errors in AIOHTTP-based applications
  • Review dependency management tools for alerts on vulnerable AIOHTTP versions

How to Mitigate CVE-2026-34519

Immediate Actions Required

  • Upgrade AIOHTTP to version 3.13.4 or later immediately
  • Audit application code for any instances where user input is passed to Response reason parameters
  • Implement input validation to strip or reject CRLF characters from any values that may reach the Response constructor
  • Review cached responses for potential poisoning if exploitation is suspected

Patch Information

The vulnerability has been patched in AIOHTTP version 3.13.4. The fix introduces validation functions that reject status lines containing newline or carriage return characters. The patch modifies both the Cython implementation (_http_writer.pyx) and the pure Python fallback (http_writer.py) to ensure consistent protection.

For detailed patch information, see the GitHub Security Advisory GHSA-mwh4-6h8g-pg8w and the release notes for v3.13.4.

Workarounds

  • Sanitize all input that may be used in Response reason phrases by removing \r and \n characters
  • Use a hardcoded reason phrase instead of dynamic values derived from user input
  • Implement a middleware layer that validates response headers before transmission
  • Deploy a reverse proxy with header validation capabilities in front of the application
bash
# Upgrade AIOHTTP to patched version
pip install --upgrade aiohttp>=3.13.4

# Verify installed version
pip show aiohttp | grep Version

# For requirements.txt, update the constraint
echo "aiohttp>=3.13.4" >> requirements.txt

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechAiohttp

  • SeverityLOW

  • CVSS Score2.7

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-113
  • Technical References
  • GitHub Commit Change

  • GitHub Release v3.13.4

  • GitHub Security Advisory GHSA-mwh4-6h8g-pg8w
  • Related CVEs
  • CVE-2026-34514: AIOHTTP XSS Vulnerability via Header Injection

  • CVE-2024-27306: Aiohttp XSS Vulnerability

  • CVE-2026-34525: AIOHTTP Multiple Host Headers Vulnerability

  • CVE-2026-34520: AIOHTTP Information Disclosure Flaw
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