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-2023-23931

CVE-2023-23931: Cryptography.io Buffer Mutation Vulnerability

CVE-2023-23931 is a buffer mutation flaw in Cryptography.io Cryptography that allows immutable objects to be mutated, violating Python rules and corrupting output. This post covers technical details, affected versions, and fixes.

Published: February 4, 2026

CVE-2023-23931 Overview

CVE-2023-23931 is a vulnerability in the Python cryptography package that allows immutable objects to be mutated through the Cipher.update_into method. This library is widely used to expose cryptographic primitives and recipes to Python developers. The vulnerability occurs because Cipher.update_into incorrectly accepts Python objects that implement the buffer protocol but provide only immutable buffers, such as bytes objects. This allows fundamental rules of Python to be violated, potentially resulting in corrupted cryptographic output.

Critical Impact

Applications using the cryptography library may produce corrupted output when immutable buffer objects are passed to Cipher.update_into, leading to potential data integrity issues and unpredictable application behavior.

Affected Products

  • cryptography.io cryptography (versions 1.8 and later until patched)
  • Python applications utilizing the Cipher.update_into method
  • Systems with vulnerable cryptography package installations

Discovery Timeline

  • February 7, 2023 - CVE CVE-2023-23931 published to NVD
  • November 3, 2025 - Last updated in NVD database

Technical Details for CVE-2023-23931

Vulnerability Analysis

This vulnerability represents an Improper Check for Unusual or Exceptional Conditions (CWE-754). The Cipher.update_into method in the cryptography library was designed to write encrypted or decrypted data directly into a provided buffer for performance optimization. However, the method failed to properly validate whether the provided buffer was mutable before writing to it.

In Python, the buffer protocol allows objects to expose their internal memory for direct access. Some objects like bytes implement this protocol but only provide read-only (immutable) access. The Cipher.update_into method did not distinguish between mutable and immutable buffers, allowing writes to occur on objects that should be immutable.

This behavior violates Python's fundamental guarantee that immutable objects remain unchanged after creation. When cryptographic operations write to an immutable buffer, the resulting data corruption can lead to unpredictable application behavior, failed cryptographic operations, or security-sensitive data being incorrectly processed.

Root Cause

The root cause is the missing validation check in Cipher.update_into that should verify the buffer's mutability before attempting write operations. The method accepted any object implementing the buffer protocol without verifying that the buffer supports write operations. This oversight has been present in the codebase since the update_into method was originally introduced in cryptography version 1.8.

Attack Vector

The vulnerability can be exploited over the network in scenarios where an attacker can influence the input parameters passed to cryptographic operations. An attacker could potentially craft inputs that cause immutable buffer mutation, resulting in:

  • Corrupted cryptographic output that may bypass integrity checks
  • Unpredictable application behavior due to violated Python invariants
  • Potential memory corruption scenarios in certain Python implementations

The fix ensures that an exception is now properly raised when an immutable buffer is passed to Cipher.update_into, preventing the corruption from occurring. For technical implementation details, refer to the GitHub Security Advisory.

Detection Methods for CVE-2023-23931

Indicators of Compromise

  • Unexpected behavior in applications using cryptographic operations with the cryptography library
  • Corrupted or unexpected output from encryption/decryption operations
  • Application crashes or errors related to buffer operations in cryptographic contexts
  • Log entries indicating memory or buffer-related anomalies during crypto operations

Detection Strategies

  • Audit application code for usage of Cipher.update_into method with immutable objects like bytes
  • Implement dependency scanning to identify vulnerable versions of the cryptography package
  • Monitor application logs for unexpected cryptographic output or buffer-related errors
  • Use Software Composition Analysis (SCA) tools to track vulnerable library versions

Monitoring Recommendations

  • Enable verbose logging for cryptographic operations to detect anomalous behavior
  • Implement integrity checks on cryptographic output to identify corruption
  • Monitor package management systems for updates to the cryptography library
  • Set up alerts for dependency vulnerability notifications from security advisories

How to Mitigate CVE-2023-23931

Immediate Actions Required

  • Upgrade the cryptography package to the latest patched version immediately
  • Review application code for instances of Cipher.update_into usage with immutable buffers
  • Replace any bytes objects passed to Cipher.update_into with mutable bytearray objects
  • Run comprehensive tests on cryptographic functionality after upgrading

Patch Information

The vulnerability has been addressed by the cryptography maintainers. The fix adds proper validation to raise an exception when an immutable buffer is passed to Cipher.update_into. Users should upgrade to the patched version as indicated in the GitHub Security Advisory. The specific commit containing the fix is available in the GitHub Commit Details.

Additional advisories have been published by Debian LTS and NetApp for affected distributions and products.

Workarounds

  • Use bytearray objects instead of bytes when calling Cipher.update_into to ensure mutable buffers are used
  • Implement wrapper functions that validate buffer mutability before passing to cryptographic methods
  • Consider using the standard Cipher.update method which returns data rather than writing to a buffer
  • Add application-level checks to verify buffer types before cryptographic operations
bash
# Upgrade cryptography package to patched version
pip install --upgrade cryptography

# Verify installed version
pip show cryptography | grep Version

# Check for vulnerable versions in requirements
pip-audit --requirement requirements.txt

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechCryptography

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.33%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-754
  • Technical References
  • Debian LTS Announcement

  • NetApp Security Advisory
  • Vendor Resources
  • GitHub Commit Details

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-34073: Python Cryptography Information Disclosure

  • CVE-2026-26007: Cryptography Package Info Disclosure Flaw

  • CVE-2023-49083: Cryptography.io Cryptography DoS Flaw

  • CVE-2020-36242: Cryptography.io Buffer Overflow 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