Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2023-25399

CVE-2023-25399: Scipy Memory Leak Vulnerability

CVE-2023-25399 is a refcounting issue in Scipy that may lead to memory leaks in the Py_FindObjects() function. This article covers the technical details, affected versions, impact, and mitigation strategies.

Published: February 4, 2026

CVE-2023-25399 Overview

A reference counting issue that leads to a potential memory leak was discovered in SciPy in the Py_FindObjects() function. This vulnerability stems from improper reference counting in Python's C API usage within the SciPy library, which can result in memory not being properly freed during object operations.

Critical Impact

This issue can lead to memory exhaustion through repeated invocations of the affected function, potentially causing denial of service conditions in long-running applications that utilize SciPy's image processing capabilities.

Important Note: This CVE is disputed by the SciPy maintainers, who classify it as a bug rather than a security vulnerability. According to the project maintainers, SciPy is not designed to be exposed to untrusted users or data directly.

Affected Products

  • SciPy (all versions prior to the fix in commit 8627df31ab)
  • Applications using SciPy's scipy.ndimage module
  • Python environments with vulnerable SciPy installations

Discovery Timeline

  • 2023-07-05 - CVE-2023-25399 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-25399

Vulnerability Analysis

The vulnerability exists in the Py_FindObjects() function within SciPy's codebase. This function is part of SciPy's image processing capabilities, specifically within the scipy.ndimage module used for multi-dimensional image processing operations.

The core issue involves improper reference counting when handling Python objects in the C extension code. In Python's C API, objects must have their reference counts properly incremented and decremented to ensure correct memory management. When a reference count is not properly decremented (missing Py_DECREF call), the object's memory is never freed, leading to a memory leak.

The disputed nature of this CVE is significant context for security teams. The SciPy maintainers have noted that the library is intended to be used in trusted computational environments where the input data is controlled, rather than as a public-facing service handling untrusted input.

Root Cause

The root cause is a reference counting error (CWE-401: Missing Release of Memory after Effective Lifetime) in the C extension code. When objects are created or borrowed in Python's C API, the developer must manually manage reference counts. In this case, the Py_FindObjects() function fails to properly decrement reference counts for certain Python objects, causing those objects to persist in memory indefinitely.

This type of bug is common in Python C extensions where developers must manually track object lifetimes, unlike pure Python code where garbage collection handles memory management automatically.

Attack Vector

Exploitation requires local access to execute Python code that calls the vulnerable function. An attacker with the ability to execute arbitrary Python code on a system could repeatedly invoke the Py_FindObjects() function to gradually exhaust available memory, leading to a denial of service condition.

The attack scenario would involve:

  1. Gaining access to execute Python code on the target system
  2. Importing SciPy and calling the vulnerable function in a loop
  3. Gradually consuming system memory until the application or system becomes unresponsive

Given the local attack vector and the requirement to execute arbitrary code, the practical exploitability is limited. Systems that already allow arbitrary code execution are typically vulnerable to more direct forms of denial of service.

Detection Methods for CVE-2023-25399

Indicators of Compromise

  • Gradual memory consumption increase in Python processes using SciPy
  • Applications using scipy.ndimage experiencing memory growth over time
  • System memory pressure without corresponding increase in active data processing
  • Python processes with unexpectedly high resident memory usage

Detection Strategies

  • Monitor memory usage patterns for Python processes utilizing SciPy libraries
  • Implement application-level memory profiling to detect gradual memory growth
  • Use Python memory profilers like tracemalloc to identify unreleased objects
  • Check installed SciPy versions against known vulnerable versions

Monitoring Recommendations

  • Set up alerts for memory usage thresholds on systems running SciPy-dependent applications
  • Implement process monitoring to detect abnormal memory growth patterns
  • Review application logs for out-of-memory errors or process crashes
  • Establish baseline memory profiles for normal application operation

How to Mitigate CVE-2023-25399

Immediate Actions Required

  • Update SciPy to the latest version that includes the fix from Pull Request #16397
  • Review applications for usage of scipy.ndimage.find_objects() function
  • Implement memory monitoring for critical SciPy-dependent applications
  • Assess whether your deployment exposes SciPy to untrusted inputs

Patch Information

The fix for this issue has been implemented in the SciPy repository. The patch addresses the reference counting issue by ensuring proper Py_DECREF calls are made for all Python objects created or borrowed during the Py_FindObjects() function execution.

For detailed information about the fix, refer to:

  • GitHub SciPy Issue Report
  • GitHub SciPy Pull Request

Workarounds

  • Limit exposure of SciPy functionality to trusted users and data sources only
  • Implement application-level memory limits using resource controls or container constraints
  • Periodically restart long-running processes that use the affected functionality
  • Consider isolating SciPy operations in separate processes that can be safely terminated and restarted
bash
# Configuration example - Update SciPy to the latest version
pip install --upgrade scipy

# Alternatively, install a specific patched version
pip install scipy>=1.11.0

# Verify installed version
pip show scipy | grep Version

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechScipy

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.16%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • NVD-CWE-Other

  • CWE-401
  • Technical References
  • Square16 CVE-2023-25399 Details

  • GitHub SciPy Comment on Issue
  • Vendor Resources
  • GitHub SciPy Issue Report

  • GitHub SciPy Pull Request
  • Related CVEs
  • CVE-2023-29824: SciPy Use-After-Free 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