A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-2026-3644

CVE-2026-3644: Python HTTP Cookies Auth Bypass Vulnerability

CVE-2026-3644 is an authentication bypass flaw in Python's http.cookies module that allows control characters to evade input validation. This article covers the technical details, affected versions, and mitigation.

Updated: May 15, 2026

CVE-2026-3644 Overview

CVE-2026-3644 is an input validation flaw in the Python standard library http.cookies module. The vulnerability stems from an incomplete fix for CVE-2026-0672, which originally rejected control characters in http.cookies.Morsel. The remediation missed several code paths, including Morsel.update(), the |= operator, and unpickling operations. Additionally, BaseCookie.js_output() lacks the output validation that BaseCookie.output() enforces. Attackers with the ability to influence cookie values can inject control characters that bypass validation, leading to potential header manipulation or downstream parsing issues. The vulnerability is categorized under [CWE-20] Improper Input Validation.

Critical Impact

Control character injection through unpatched Morsel update paths can bypass cookie validation, enabling HTTP header manipulation in applications relying on Python's standard library cookie handling.

Affected Products

  • Python CPython interpreter (versions including the incomplete CVE-2026-0672 fix)
  • Applications using http.cookies.Morsel.update() or the |= operator
  • Applications calling BaseCookie.js_output() for JavaScript cookie rendering

Discovery Timeline

  • 2026-03-16 - CVE-2026-3644 published to NVD
  • 2026-03-17 - Last updated in NVD database

Technical Details for CVE-2026-3644

Vulnerability Analysis

The Python http.cookies module provides classes for parsing and constructing HTTP cookie headers. The original fix for CVE-2026-0672 added control character rejection to Morsel value assignment, preventing characters such as carriage return and line feed from being stored in cookie values. The fix focused on direct attribute setters but did not extend coverage to alternative mutation paths.

The Morsel.update() method, inherited from dict, accepts a mapping or iterable and writes values without invoking the validation logic. The |= operator, introduced for dictionary merging in Python 3.9, follows the same unvalidated code path. Unpickling a Morsel instance reconstructs the object state directly, again skipping the value sanitization routines.

Separately, BaseCookie.js_output() generates JavaScript-formatted cookie assignments for client-side rendering. While BaseCookie.output() validates each Morsel before emitting header lines, js_output() was not updated with equivalent checks. An attacker who controls cookie input can inject \r\n sequences or other control characters into rendered output.

Root Cause

The root cause is incomplete enforcement of input validation invariants. Validation logic was attached to specific setter functions rather than centralized in a single chokepoint that all mutation paths must traverse. This allowed update(), |=, and unpickling to bypass the check entirely. The js_output() divergence reflects parallel rendering paths that were not kept in sync when output sanitization was added.

Attack Vector

Exploitation requires the attacker to influence cookie keys or values processed by a vulnerable Python application. In web applications that accept user-controlled data and use Morsel.update() or dictionary-merge syntax to populate cookies, the attacker can inject control characters. When such cookies are later serialized through js_output(), the malicious characters appear in the output without filtering. This can enable HTTP response splitting, header injection, or client-side parser confusion. Successful exploitation requires low privileges and no user interaction, but depends on application logic that exposes the unvalidated paths. Refer to the Python Security Announce Thread for technical details.

// No verified exploit code is published.
// See upstream CPython commits for the validation gaps and fixes:
// - https://github.com/python/cpython/commit/57e88c1cf95e1481b94ae57abe1010469d47a6b4
// - https://github.com/python/cpython/commit/62ceb396fcbe69da1ded3702de586f4072b590dd
// - https://github.com/python/cpython/commit/d16ecc6c3626f0e2cc8f08c309c83934e8a979dd

Detection Methods for CVE-2026-3644

Indicators of Compromise

  • HTTP responses containing unexpected \r\n or other control character sequences within Set-Cookie headers or inline JavaScript cookie assignments.
  • Application logs showing cookie values that include non-printable bytes after passing through Morsel.update() or |= operations.
  • Anomalous pickle deserialization events restoring Morsel objects from untrusted sources.

Detection Strategies

  • Audit Python source code for direct use of Morsel.update(), the |= operator on Morsel instances, and BaseCookie.js_output() with user-influenced data.
  • Add runtime assertions or wrappers that validate cookie values against the standard cookie grammar before rendering responses.
  • Inspect web application firewall logs for inbound requests containing encoded control characters targeting cookie parameters.

Monitoring Recommendations

  • Capture and review outbound HTTP headers to identify CRLF sequences indicative of header injection attempts.
  • Monitor Python application telemetry for unpickling operations sourced from network-attached or user-controlled storage.
  • Track the deployed Python interpreter version across hosts and flag environments lacking the upstream patch.

How to Mitigate CVE-2026-3644

Immediate Actions Required

  • Upgrade Python to a release containing the CPython commits referenced in the GitHub Pull Request Review.
  • Inventory applications using http.cookies and confirm whether they invoke Morsel.update(), |=, or js_output() with untrusted input.
  • Disable or restrict unpickling of Morsel objects originating from external sources.

Patch Information

The upstream CPython project addressed the gap through three commits referenced in the advisory: commit 57e88c1, commit 62ceb39, and commit d16ecc6. Discussion and review are tracked in GitHub Issue 145599 and Pull Request 145600. Apply vendor-supplied Python interpreter updates from your operating system or Python distribution.

Workarounds

  • Wrap Morsel.update() calls in application code with a custom validator that rejects control characters before assignment.
  • Replace calls to BaseCookie.js_output() with BaseCookie.output() where possible, or apply explicit validation on the rendered string.
  • Treat any cookie content sourced from external systems as untrusted and sanitize it prior to reuse in HTTP responses.
bash
# Verify the installed Python version and apply distribution updates
python3 --version

# Example: upgrade Python on Debian-based systems
sudo apt-get update && sudo apt-get install --only-upgrade python3

# Example: upgrade in a virtual environment using pyenv
pyenv install --list | grep 3.
pyenv install <patched-version>
pyenv global <patched-version>

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechN/A

  • SeverityMEDIUM

  • CVSS Score6.0

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/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-20
  • Technical References
  • GitHub Commit Update

  • GitHub Commit Update

  • GitHub Commit Update

  • GitHub Issue Discussion

  • GitHub Pull Request Review

  • Python Security Announce Thread
  • Latest CVEs
  • CVE-2026-50263: X.org X Server Use-After-Free Flaw

  • CVE-2026-21033: Samsung Assistant RCE Vulnerability

  • CVE-2026-21032: Samsung Assistant RCE Vulnerability

  • CVE-2026-50260: X.org X Server Use-After-Free Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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