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
    • 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-2025-24359

CVE-2025-24359: ASTEVAL Python RCE Vulnerability

CVE-2025-24359 is a remote code execution vulnerability in ASTEVAL Python library that allows attackers to bypass restrictions and execute arbitrary code. This post covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-24359 Overview

CVE-2025-24359 is a Code Injection vulnerability in ASTEVAL, a Python library designed for safe evaluation of Python expressions and statements. Prior to version 1.0.6, an attacker who can control input to the asteval library can bypass its security restrictions and execute arbitrary Python code within the context of the application using the library.

The vulnerability stems from improper handling of FormattedValue AST nodes, where the on_formattedvalue method uses the dangerous str.format() method. This allows attackers to manipulate the string value used in the format call, enabling access to protected attributes by intentionally triggering AttributeError exceptions. By catching these exceptions and accessing their obj attribute, attackers can gain arbitrary access to sensitive or protected object properties.

Critical Impact

Attackers can bypass ASTEVAL's sandboxing restrictions to execute arbitrary Python code, potentially leading to complete application compromise, data theft, or lateral movement within the environment.

Affected Products

  • ASTEVAL versions prior to 1.0.6
  • Applications using vulnerable ASTEVAL versions for Python expression evaluation
  • Systems accepting user-controlled input processed by ASTEVAL

Discovery Timeline

  • 2025-01-24 - CVE CVE-2025-24359 published to NVD
  • 2025-01-24 - Last updated in NVD database

Technical Details for CVE-2025-24359

Vulnerability Analysis

This vulnerability represents a sandbox escape in ASTEVAL's expression evaluation framework. ASTEVAL is commonly used when applications need to safely evaluate user-provided Python expressions without exposing the full Python interpreter. The security model relies on AST (Abstract Syntax Tree) parsing and controlled node handling to prevent dangerous operations.

The flaw exists in the on_formattedvalue method within asteval.py, specifically around line 507 in the source code. When processing f-string formatted values, the code invokes Python's native str.format() method with attacker-controllable input. This is a well-documented dangerous pattern in Python, as str.format() can access object attributes through its format specification mini-language.

The exploitation technique leverages Python's exception handling mechanism. When an AttributeError is raised, the exception object contains an obj attribute referencing the object where the attribute lookup failed. Attackers can weaponize this behavior to traverse object graphs and access protected attributes that ASTEVAL's sandbox was designed to prevent.

Root Cause

The root cause is the use of Python's str.format() method with user-controlled format strings (CWE-134: Use of Externally-Controlled Format String). The on_formattedvalue handler constructs a format call fmt.format(__fstring__=val) where the format string content can be influenced by attacker input. As documented in Armin Ronacher's analysis of str.format dangers, this pattern allows attribute traversal and can expose sensitive data or enable code execution when combined with other techniques.

Attack Vector

The attack requires local access and the ability to provide malicious input that gets processed by ASTEVAL. An attacker crafts a specially formatted Python expression containing f-string syntax designed to:

  1. Trigger attribute access on internal objects through format string specifications
  2. Intentionally cause an AttributeError exception
  3. Catch the exception and access its obj attribute
  4. Use the returned object reference to traverse to sensitive attributes or methods

The vulnerability is exploited through crafted f-string expressions that abuse Python's format specification mini-language. The attacker provides input that accesses object attributes through format field names, then leverages exception handling to capture object references that should be sandboxed. This technique allows escaping ASTEVAL's intended security boundaries to execute arbitrary Python code.

For full technical details, see the GitHub Security Advisory GHSA-3wwr-3g9f-9gc7.

Detection Methods for CVE-2025-24359

Indicators of Compromise

  • Unusual Python expressions containing nested attribute access patterns in ASTEVAL inputs
  • Application logs showing AttributeError exceptions followed by unexpected object property access
  • Evidence of f-string expressions with complex format specifications targeting internal attributes
  • Attempts to access __class__, __globals__, __builtins__, or other sensitive Python attributes

Detection Strategies

  • Monitor application logs for patterns indicative of format string exploitation attempts in ASTEVAL contexts
  • Implement input validation to detect and block expressions containing suspicious attribute traversal patterns
  • Deploy runtime application self-protection (RASP) to detect sandbox escape attempts
  • Review code for ASTEVAL usage and audit input sources for potential attacker control

Monitoring Recommendations

  • Enable verbose logging for applications using ASTEVAL to capture expression evaluation details
  • Set up alerts for exception patterns that may indicate exploitation attempts
  • Monitor for unexpected child processes or network connections from applications using ASTEVAL
  • Audit dependency versions regularly to detect vulnerable ASTEVAL installations

How to Mitigate CVE-2025-24359

Immediate Actions Required

  • Upgrade ASTEVAL to version 1.0.6 or later immediately
  • Audit all applications using ASTEVAL to identify instances where user input reaches the evaluator
  • Implement additional input validation layers before passing data to ASTEVAL
  • Review application architecture to minimize exposure of ASTEVAL to untrusted input

Patch Information

The vulnerability is fixed in ASTEVAL version 1.0.6. The patch addresses the unsafe handling of FormattedValue AST nodes by modifying how the on_formattedvalue method processes format strings, eliminating the dangerous str.format() call pattern that enabled attribute traversal.

To upgrade, use pip:

bash
pip install --upgrade asteval>=1.0.6

Verify the installed version:

bash
pip show asteval | grep Version

Workarounds

  • If immediate upgrade is not possible, implement strict input sanitization to reject expressions containing f-string syntax
  • Wrap ASTEVAL execution in additional sandboxing such as restricted subprocess environments or containers
  • Limit the scope of objects accessible within the ASTEVAL context to minimize exploitation impact
  • Consider alternative expression evaluation libraries with stronger sandboxing guarantees for high-risk use cases

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechAsteval

  • SeverityHIGH

  • CVSS Score8.4

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-134
  • Technical References
  • GitHub Source Code File

  • GitHub Security Advisory GHSA-3wwr-3g9f-9gc7

  • Lucumr Blog Post on str.format
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE 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