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

CVE-2026-27459: pyOpenSSL Buffer Overflow Vulnerability

CVE-2026-27459 is a buffer overflow vulnerability in pyOpenSSL that occurs when cookie values exceed 256 bytes. This post covers the technical details, affected versions 22.0.0 to 26.0.0, impact, and mitigation.

Published: March 20, 2026

CVE-2026-27459 Overview

CVE-2026-27459 is a buffer overflow vulnerability in pyOpenSSL, a Python wrapper around the OpenSSL library. The vulnerability exists in versions 22.0.0 through 25.x.x and occurs when a user-provided callback to set_cookie_generate_callback returns a cookie value greater than 256 bytes. When this happens, pyOpenSSL overflows an OpenSSL-provided buffer, potentially leading to memory corruption and code execution.

Critical Impact

This buffer overflow vulnerability could allow attackers to corrupt memory or potentially achieve code execution by exploiting applications that use custom DTLS cookie generation callbacks with improperly validated cookie lengths.

Affected Products

  • pyOpenSSL versions >= 22.0.0 and < 26.0.0
  • Applications using set_cookie_generate_callback with custom callbacks
  • DTLS-enabled Python applications using vulnerable pyOpenSSL versions

Discovery Timeline

  • 2026-03-18 - CVE-2026-27459 published to NVD
  • 2026-03-18 - Last updated in NVD database

Technical Details for CVE-2026-27459

Vulnerability Analysis

This vulnerability is classified as CWE-120 (Buffer Copy without Checking Size of Input). The flaw exists in the DTLS cookie generation callback handling mechanism within pyOpenSSL. When developers implement custom cookie generation callbacks using set_cookie_generate_callback, the library failed to validate that the returned cookie value fits within the OpenSSL-defined buffer size limit (DTLS1_COOKIE_LENGTH, which is 255 bytes).

The vulnerability is network-accessible and requires high attack complexity with a specific active precondition. Exploitation would require an attacker to influence the behavior of a vulnerable application's cookie generation callback to return an oversized cookie value, which would then overflow the internal OpenSSL buffer.

Root Cause

The root cause is insufficient input validation in the callback wrapper code within src/OpenSSL/SSL.py. When a user-defined callback returned a cookie value, the code directly copied the cookie bytes into the OpenSSL-provided output buffer without first verifying that the cookie length did not exceed DTLS1_COOKIE_LENGTH. This allowed arbitrarily long cookie values to overflow the fixed-size buffer.

Attack Vector

The attack vector is network-based, targeting applications that implement DTLS (Datagram Transport Layer Security) with custom cookie generation callbacks. An attacker would need to trigger conditions where the application's callback returns an oversized cookie. The exploitation path requires:

  1. Target application uses pyOpenSSL versions 22.0.0 to 25.x.x
  2. Application implements set_cookie_generate_callback with a custom callback
  3. Attacker can influence the callback to return a cookie longer than 255 bytes
  4. The overflow corrupts adjacent memory, potentially enabling code execution

The following patch demonstrates the fix applied in version 26.0.0:

python
     def __init__(self, callback: _CookieGenerateCallback) -> None:
         _CallbackExceptionHelper.__init__(self)

+        max_cookie_len = getattr(_lib, "DTLS1_COOKIE_LENGTH", 255)
+
         @wraps(callback)
         def wrapper(ssl, out, outlen):  # type: ignore[no-untyped-def]
             try:
                 conn = Connection._reverse_mapping[ssl]
                 cookie = callback(conn)
+                if len(cookie) > max_cookie_len:
+                    raise ValueError(
+                        f"Cookie too long (got {len(cookie)} bytes, "
+                        f"max {max_cookie_len})"
+                    )
                 out[0 : len(cookie)] = cookie
                 outlen[0] = len(cookie)
                 return 1

Source: GitHub Commit Details

Detection Methods for CVE-2026-27459

Indicators of Compromise

  • Application crashes or unexpected terminations in DTLS-enabled Python services
  • Memory corruption errors in processes using pyOpenSSL for DTLS operations
  • Unusual behavior in applications implementing custom set_cookie_generate_callback handlers
  • Stack traces indicating buffer overflows in OpenSSL or pyOpenSSL library code

Detection Strategies

  • Audit Python dependencies using pip list or pip freeze to identify pyOpenSSL versions between 22.0.0 and 25.x.x
  • Review application code for usage of set_cookie_generate_callback with custom callbacks
  • Implement static code analysis to identify custom callback implementations that may return variable-length cookies
  • Use memory sanitizers (ASan/MSan) in development environments to detect buffer overflow conditions

Monitoring Recommendations

  • Monitor application logs for ValueError exceptions related to cookie length validation after upgrading
  • Implement runtime monitoring for memory corruption indicators in DTLS-enabled services
  • Set up dependency scanning in CI/CD pipelines to flag vulnerable pyOpenSSL versions
  • Track process crashes and core dumps that may indicate exploitation attempts

How to Mitigate CVE-2026-27459

Immediate Actions Required

  • Upgrade pyOpenSSL to version 26.0.0 or later immediately
  • Audit all custom set_cookie_generate_callback implementations to ensure cookies do not exceed 255 bytes
  • Review DTLS-enabled applications for exposure to untrusted network input
  • Consider temporarily disabling DTLS functionality if immediate patching is not possible

Patch Information

The vulnerability has been fixed in pyOpenSSL version 26.0.0. The patch adds proper length validation to the cookie generation callback wrapper, raising a ValueError if a callback returns a cookie longer than DTLS1_COOKIE_LENGTH bytes. Organizations should upgrade to version 26.0.0 or later to remediate this vulnerability.

For detailed patch information, refer to the GitHub Security Advisory GHSA-5pwr-322w-8jr4 and the GitHub Commit Details.

Workarounds

  • Implement cookie length validation within custom callback functions before returning the cookie value
  • Ensure all custom callbacks truncate or reject cookies exceeding 255 bytes
  • Add application-level input validation for any data that influences cookie generation
  • Consider using fixed-length cookie generation strategies as a temporary measure
bash
# Upgrade pyOpenSSL to patched version
pip install --upgrade pyopenssl>=26.0.0

# Verify installed version
pip show pyopenssl | grep Version

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechPyopenssl

  • SeverityHIGH

  • CVSS Score7.2

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/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
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-120
  • Technical References
  • GitHub Change Log

  • GitHub Commit Details

  • GitHub Security Advisory GHSA-5pwr-322w-8jr4
  • Related CVEs
  • CVE-2026-27448: pyOpenSSL Auth Bypass 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