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-23336

CVE-2021-23336: Python Web Cache Poisoning Vulnerability

CVE-2021-23336 is a web cache poisoning vulnerability in Python's urllib.parse module that exploits parameter cloaking via semicolon separators. This article covers the technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-23336 Overview

CVE-2021-23336 is a Web Cache Poisoning vulnerability affecting Python's urllib.parse.parse_qsl and urllib.parse.parse_qs functions. The vulnerability enables attackers to exploit a parameter cloaking technique by using semicolons (;) as query parameter separators, creating a discrepancy between how proxy servers and backend Python applications interpret HTTP requests. This inconsistency allows malicious requests to be cached as legitimate ones, potentially serving poisoned content to unsuspecting users.

Critical Impact

Attackers can exploit this vulnerability to poison web caches, causing cached malicious responses to be served to users. This can lead to widespread impact including denial of service, data integrity issues, and potential exploitation of downstream users relying on cached content.

Affected Products

  • Python CPython versions before 3.6.13, 3.7.0-3.7.9, 3.8.0-3.8.7, and 3.9.0-3.9.1
  • Django (multiple versions affected)
  • Fedora 32, 33, and 34
  • Debian Linux 9.0
  • NetApp Cloud Backup, Inventory Collect Tool, ONTAP Select Deploy Administration Utility, and SnapCenter
  • Oracle Communications Offline Mediation Controller, Communications Pricing Design Center, Enterprise Manager Ops Center, and ZFS Storage Appliance

Discovery Timeline

  • February 15, 2021 - CVE-2021-23336 published to NVD
  • December 17, 2025 - Last updated in NVD database

Technical Details for CVE-2021-23336

Vulnerability Analysis

This vulnerability exploits the inconsistent handling of query string parameter separators between web proxies and Python applications. The core issue lies in how Python's urllib.parse module historically accepted both ampersands (&) and semicolons (;) as valid parameter separators in query strings, while most proxy servers and caching systems only recognize ampersands as separators.

When a malicious request contains parameters separated by semicolons, the proxy server treats the entire segment (including the semicolon and subsequent parameters) as a single parameter value. However, the Python backend correctly parses the semicolon-separated parameters individually. This parsing discrepancy enables the attacker to "cloak" malicious parameters that influence the server's response without affecting the cache key generated by the proxy.

The attack requires network access and some user interaction, making successful exploitation dependent on specific environmental conditions. However, once cache poisoning is achieved, the impact can be significant as poisoned responses are served to all users requesting the same cached resource.

Root Cause

The root cause is the dual acceptance of semicolons and ampersands as parameter separators in urllib.parse.parse_qsl() and urllib.parse.parse_qs() functions. This behavior, while technically valid according to older HTTP specifications, creates an inconsistency with modern web infrastructure where semicolons are not typically recognized as separators by proxies and caches.

Attack Vector

The attack vector is network-based, requiring the attacker to craft malicious HTTP requests that exploit the parsing discrepancy. The attacker constructs a URL where semicolons separate hidden parameters that influence the server's response. When this request passes through a caching proxy, the proxy generates a cache key that doesn't account for the semicolon-separated parameters, while the Python application processes them normally.

For example, a request like /?param=value;injected=malicious would be cached by the proxy under a key that treats value;injected=malicious as the entire value of param. However, Python's parse_qs() function would parse this as two separate parameters: param=value and injected=malicious. If the injected parameter influences the response content, the attacker can poison the cache with a malicious response that gets served to other users.

Detection Methods for CVE-2021-23336

Indicators of Compromise

  • Unusual query strings containing semicolons in web server access logs
  • Cache hit responses that don't match expected content for the requested URL
  • Anomalous parameter patterns in HTTP requests targeting Python-based web applications
  • Discrepancies between proxy logs and application logs for the same request

Detection Strategies

  • Monitor web server and proxy logs for query strings containing semicolons that may indicate parameter cloaking attempts
  • Implement application-layer logging to compare parsed query parameters with raw query strings
  • Deploy web application firewalls (WAF) with rules to detect and alert on semicolon usage in query parameters
  • Review cache behavior by comparing cached content hashes with expected responses

Monitoring Recommendations

  • Enable verbose logging on caching proxies to capture full query strings including potential semicolon separators
  • Implement integrity checking for cached responses to detect unexpected content modifications
  • Set up alerts for increased rates of requests containing semicolons in query parameters
  • Monitor for anomalous cache hit ratios that may indicate poisoning activity

How to Mitigate CVE-2021-23336

Immediate Actions Required

  • Upgrade Python to patched versions: 3.6.13+, 3.7.10+, 3.8.8+, or 3.9.2+
  • Review and update Django installations to patched versions that address this vulnerability
  • Audit applications using urllib.parse.parse_qs() and urllib.parse.parse_qsl() for potential exposure
  • Configure web application firewalls to reject or sanitize requests containing semicolons in query parameters

Patch Information

The vulnerability has been addressed through the GitHub CPython Pull Request, which changes the default behavior of the affected functions to no longer accept semicolons as parameter separators. Security advisories have been issued by multiple vendors including Oracle Security Advisory, NetApp Security Advisory, and Gentoo GLSA 202104-04. Debian and Fedora have also released updated packages addressing this vulnerability.

Workarounds

  • Configure the separator parameter explicitly in parse_qs() and parse_qsl() calls to use only ampersand (&) as the separator
  • Implement request preprocessing to normalize query strings by removing or encoding semicolons before they reach Python parsing functions
  • Deploy proxy configurations that explicitly reject requests containing semicolons in query parameters
  • Use application-level input validation to sanitize query strings before processing
bash
# Python configuration to explicitly set separator
# In your application code, replace:
# urllib.parse.parse_qs(query_string)
# With:
# urllib.parse.parse_qs(query_string, separator='&')

# For Django applications, upgrade to patched version:
pip install --upgrade Django>=2.2.19
pip install --upgrade Django>=3.0.13
pip install --upgrade Django>=3.1.7

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechPython

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability0.30%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityLow
  • AvailabilityHigh
  • CWE References
  • CWE-444
  • Technical References
  • OpenWall OSS Security Update

  • Apache Airflow User Thread

  • Apache Announce Thread

  • Apache Mina Dev Thread

  • Debian LTS Security Announcement

  • Debian LTS Security Update

  • Debian LTS Security Fix

  • Debian LTS Security Notice

  • Fedora Package Announcement

  • Fedora Package Update

  • Fedora Security Announcement

  • Fedora Package Notice

  • Fedora Security Advisory

  • Fedora Package Announcement

  • Fedora Package Update

  • Fedora Package Notice

  • Fedora Security Advisory

  • Fedora Package Announcement

  • Fedora Package Update

  • Fedora Package Notice

  • Fedora Package Announcement

  • Fedora Package Update

  • Fedora Package Announcement

  • Fedora Package Update

  • Fedora Package Announcement

  • Fedora Package Update

  • Gentoo GLSA 202104-04

  • NetApp Security Advisory

  • Snyk Blog on Cache Poisoning

  • Snyk Vulnerability SNYK-UPSTREAM-PYTHONCPYTHON-1074933

  • Oracle Security Alert July 2021
  • Vendor Resources
  • OpenWall OSS Security Announcement

  • GitHub CPython Pull Request

  • Oracle Security Alert April 2021

  • Oracle Security Alert January 2022

  • Oracle Security Alert October 2021

  • Oracle
  • Related CVEs
  • CVE-2025-13462: Python tarfile Module Parsing Vulnerability

  • CVE-2024-6923: CPython Email Header Injection Flaw

  • CVE-2020-26116: Python HTTP Client CRLF Injection Flaw

  • CVE-2020-15523: Python DLL Hijacking 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