A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-2024-21502

CVE-2024-21502: Fastecdsa Use of Uninitialized Variable

CVE-2024-21502 is a use of uninitialized variable flaw in Antonkueltz Fastecdsa that enables denial of service attacks through stack manipulation. This article covers the technical details, affected versions, and mitigation steps.

Published: May 26, 2026

CVE-2024-21502 Overview

CVE-2024-21502 affects versions of the Python fastecdsa package prior to 2.3.2. The vulnerability stems from use of an uninitialized stack variable in the curvemath_mul function within src/curveMath.c. The uninitialized memory is interpreted as a user-defined type, which can lead to arbitrary free(), arbitrary realloc(), null pointer dereference, and related memory corruption conditions. Because attackers can influence the stack contents, the flaw can corrupt allocator structures and create conditions for heap exploitation or denial of service. The package author addressed the issue in commit 57fc5689c95d649dab7ef60cc99ac64589f01e36.

Critical Impact

Network-reachable callers of fastecdsa can trigger memory corruption or denial of service through manipulated inputs that exercise the vulnerable elliptic curve multiplication path.

Affected Products

  • antonkueltz fastecdsa versions prior to 2.3.2
  • Python applications depending on vulnerable fastecdsa releases
  • Downstream packages bundling fastecdsa for ECDSA cryptographic operations

Discovery Timeline

  • 2024-02-24 - CVE-2024-21502 published to the National Vulnerability Database (NVD)
  • 2025-02-12 - Last updated in NVD database

Technical Details for CVE-2024-21502

Vulnerability Analysis

The vulnerability resides in the curvemath_mul function in src/curveMath.c, which implements scalar multiplication on elliptic curves. The function declares a PointZZ_p result structure on the stack but does not initialize its internal mpz_t members before they are used. The GMP library expects mpz_t variables to be initialized via mpz_init before any operation that reads or writes them.

When the uninitialized structure is passed to downstream GMP routines, the library interprets stack residue as valid mpz_t metadata, including allocator pointers and size fields. Operations such as mpz_set, mpz_realloc, and the eventual mpz_clear then operate on attacker-influenced values. This maps to CWE-457 (Use of Uninitialized Variable) and CWE-908 (Use of Uninitialized Resource).

Root Cause

The root cause is the omission of mpz_inits(result.x, result.y, NULL) prior to use of the result structure. Stack contents from previous frames populate the structure, and GMP treats those bytes as live limb pointers and length fields. Depending on the residual values, this produces arbitrary free(), arbitrary realloc(), or null pointer dereference behavior inside the allocator.

Attack Vector

An attacker who controls scalar or curve parameters supplied to fastecdsa operations can influence the stack state leading into curvemath_mul. Applications that accept untrusted ECDSA signatures, public keys, or curve parameters over the network expose this code path. Successful exploitation corrupts heap allocator metadata and can be chained toward heap exploitation, while the minimum observable impact is process crash and denial of service.

c
     }
 
     PointZZ_p result;
+    mpz_inits(result.x, result.y, NULL);
     mpz_t scalar;
     mpz_init_set_str(scalar, d, 10);
     CurveZZ_p * curve = buildCurveZZ_p(p, a, b, q, gx, gy, 10);;

Source: GitHub patch commit 57fc5689. The patch adds the missing mpz_inits call so the result structure holds valid GMP state before use.

Detection Methods for CVE-2024-21502

Indicators of Compromise

  • Repeated segmentation faults or SIGABRT events in Python processes loading fastecdsa extensions
  • Glibc allocator diagnostics such as free(): invalid pointer or malloc_consolidate(): invalid chunk size emitted by applications using fastecdsa
  • Anomalous core dumps with stack traces referencing curvemath_mul or _curveMath.so

Detection Strategies

  • Inventory Python environments and identify installations of fastecdsa below version 2.3.2 using pip list or software composition analysis tooling
  • Scan source repositories and lockfiles (requirements.txt, Pipfile.lock, poetry.lock) for pinned vulnerable versions
  • Review code that passes externally controlled scalars or curve parameters into fastecdsa APIs such as curve.G * k

Monitoring Recommendations

  • Forward process crash telemetry and glibc allocator errors from production hosts to a centralized logging platform for correlation
  • Track outbound calls to package indexes to detect installations of unpatched fastecdsa versions
  • Alert on repeated unhandled exceptions originating from ECDSA verification paths in application logs

How to Mitigate CVE-2024-21502

Immediate Actions Required

  • Upgrade fastecdsa to version 2.3.2 or later in all Python environments and container images
  • Rebuild and redeploy applications that statically bundle the vulnerable C extension
  • Audit application entry points that accept untrusted ECDSA signatures, keys, or curve parameters and add input validation

Patch Information

The fix is delivered in commit 57fc5689c95d649dab7ef60cc99ac64589f01e36 and shipped in fastecdsa 2.3.2. The patch initializes the resultPointZZ_p structure via mpz_inits(result.x, result.y, NULL) before any GMP operation touches its members. Refer to the upstream commit and the Snyk advisory for additional context.

Workarounds

  • Replace fastecdsa with an alternative ECDSA implementation such as cryptography or ecdsa until upgrades can be applied
  • Reject untrusted scalar or curve parameters at the application layer before they reach fastecdsa APIs
  • Run affected services under process supervisors that restart on crash and isolate them with seccomp or container sandboxing to limit blast radius
bash
# Upgrade fastecdsa to the patched release
pip install --upgrade 'fastecdsa>=2.3.2'

# Verify installed version
python -c "import fastecdsa, importlib.metadata as m; print(m.version('fastecdsa'))"

# Pin the minimum safe version in requirements.txt
echo 'fastecdsa>=2.3.2' >> requirements.txt

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechFastecdsa

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.15%

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

  • CWE-908
  • Technical References
  • GitHub Gist Example

  • GitHub Source Code

  • Snyk Vulnerability Information
  • Vendor Resources
  • GitHub Commit History
  • Latest CVEs
  • CVE-2024-8261: Prolizyazilim OBS Auth Bypass Vulnerability

  • CVE-2024-13068: LimonDesk Auth Bypass Vulnerability

  • CVE-2025-53679: Fortinet FortiSandbox RCE Vulnerability

  • CVE-2026-9446: Simple POS Inventory System SQLi Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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