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
    • 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-1299

CVE-2026-1299: Email Module Header Injection Vulnerability

CVE-2026-1299 is a header injection vulnerability in the email module's BytesGenerator class that occurs when serializing email messages with improperly quoted newlines. This article covers technical details, impact, and fixes.

Published: January 30, 2026

CVE-2026-1299 Overview

CVE-2026-1299 is a header injection vulnerability in the Python email module, specifically affecting the BytesGenerator class. The vulnerability occurs due to improper quoting of newlines for email headers when serializing an email message. This allows attackers to inject arbitrary headers when an email is serialized, potentially enabling email spoofing, phishing attacks, or bypassing email security controls.

This vulnerability is specifically applicable when using LiteralHeader to write headers that don't respect email folding rules. The updated behavior rejects incorrectly folded headers in BytesGenerator.

Critical Impact

Attackers can inject arbitrary email headers during message serialization, potentially enabling email spoofing, phishing campaigns, or bypassing security controls in email processing applications.

Affected Products

  • Python email module (BytesGenerator class)
  • Applications using LiteralHeader for email header serialization
  • Email processing systems relying on Python's email library

Discovery Timeline

  • 2026-01-23 - CVE CVE-2026-1299 published to NVD
  • 2026-01-26 - Last updated in NVD database

Technical Details for CVE-2026-1299

Vulnerability Analysis

This vulnerability is classified as CWE-93 (Improper Neutralization of CRLF Sequences), commonly known as CRLF Injection or HTTP Response Splitting when applied to HTTP contexts. In this case, it manifests as email header injection.

The BytesGenerator class in Python's email module is responsible for serializing email messages into byte format for transmission. The vulnerability arises because the class fails to properly quote or escape newline characters (CR/LF sequences) within email headers during the serialization process.

When an attacker controls input that becomes part of an email header, they can inject newline characters followed by additional header content. Since email headers are separated by newlines, this allows the injection of entirely new headers into the outgoing email message.

The attack requires network access and low privileges, but depends on specific conditions being present—namely, the application must be using LiteralHeader for writing headers that don't follow standard email folding rules.

Root Cause

The root cause of this vulnerability is insufficient input validation and sanitization in the BytesGenerator class when processing email header content. The class did not properly quote or escape newline characters (CRLF sequences) present in header values before serialization.

Specifically, when LiteralHeader is used to write headers that bypass standard email folding rules, the BytesGenerator class would pass through unescaped newline sequences, allowing attackers to terminate the current header and inject additional malicious headers.

Attack Vector

The attack vector is network-based, requiring an attacker to provide malicious input that gets incorporated into email headers. The exploitation scenario typically involves:

  1. An attacker identifies an application that uses Python's email module with LiteralHeader for email generation
  2. The attacker provides input containing CRLF sequences (e.g., \r\n) followed by injected header content
  3. When the email is serialized using BytesGenerator, the malicious newlines are not properly escaped
  4. The resulting email contains attacker-controlled headers, which could include spoofed From addresses, additional recipients via Bcc, or manipulated Subject lines

The vulnerability enables header injection attacks that could be leveraged for phishing, spam distribution, or bypassing email authentication mechanisms.

Detection Methods for CVE-2026-1299

Indicators of Compromise

  • Outbound emails containing unexpected or duplicate headers
  • Email logs showing malformed header structures or CRLF sequences in header values
  • Reports of spoofed emails originating from legitimate application infrastructure

Detection Strategies

  • Monitor email generation logs for unusual header patterns or CRLF sequences in header values
  • Implement email gateway rules to flag outbound messages with suspicious header structures
  • Review application code for usage of LiteralHeader with user-controlled input

Monitoring Recommendations

  • Enable verbose logging for email serialization operations in Python applications
  • Configure email security gateways to alert on emails with non-standard header formatting
  • Audit applications using Python's email module for proper input sanitization

How to Mitigate CVE-2026-1299

Immediate Actions Required

  • Update Python to a patched version that rejects incorrectly folded headers in BytesGenerator
  • Review and sanitize all user-controlled input that may be incorporated into email headers
  • Consider implementing additional input validation at the application layer before email serialization

Patch Information

The Python development team has released patches to address this vulnerability. The updated BytesGenerator class now rejects incorrectly folded headers when using LiteralHeader. Multiple commits have been applied to the cpython repository:

  • GitHub cpython Commit Fix
  • GitHub cpython Commit Update
  • GitHub cpython Commit Bugfix

For additional details, refer to the GitHub cpython Issue Discussion, GitHub cpython Pull Request, and the Python Security Announcement Email.

Workarounds

  • Avoid using LiteralHeader with user-controlled input until patches are applied
  • Implement strict input validation to strip or reject CRLF sequences from any data used in email headers
  • Use standard email header APIs that enforce proper folding rules rather than LiteralHeader

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechN/A

  • SeverityMEDIUM

  • CVSS Score6.0

  • EPSS Probability0.03%

  • 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-93
  • Technical References
  • CVE-2024-6923 CVE Record

  • GitHub cpython Commit Update

  • GitHub cpython Commit Fix

  • GitHub cpython Commit Enhancements

  • GitHub cpython Commit Refactor

  • GitHub cpython Commit Bugfix

  • GitHub cpython Issue Discussion

  • GitHub cpython Pull Request

  • Python Security Announcement Email
  • Latest CVEs
  • CVE-2025-52479: HTTP.jl & URIs.jl CRLF Injection Flaw

  • CVE-2026-31740: Linux Kernel Race Condition Vulnerability

  • CVE-2026-31743: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31744: Linux Kernel NULL Pointer 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