CVE-2024-21502: Fastecdsa Uninitialized Variable Vulnerability
HIGHCVE-2024-21502 is a HIGH (CVSS 7.5) uninitialized variable vulnerability (CWE-457: Use of Uninitialized Variable) affecting Fastecdsa libraries in the PyPI ecosystem. The issue involves uninitialized variable in fastecdsa. Remediation is available by upgrading affected packages to version 2.3.2.
CVE-2024-21502 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2024-21502
To remediate this vulnerability, upgrade all affected Fastecdsa dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install fastecdsa>=2.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show fastecdsa
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-21502, inspect your installed packages using pip:
pip show fastecdsa
Analyze the terminal output to locate any version of Fastecdsa in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.2), your application is affected.
Note: The pip show fastecdsa command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-457: Use of Uninitialized Variable, where the code uses a variable that has not been initialized, leading to unpredictable or unintended results. In Fastecdsa, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-21502 Affected Fastecdsa Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
fastecdsa
|
PyPI |
< 2.3.2
|
2.3.2
|
References
Frequently Asked Questions
What is CVE-2024-21502?
Which Fastecdsa versions are affected?
What version fixes CVE-2024-21502?
Is fastecdsa affected?
What is the CVSS score of CVE-2024-21502?
What CWE is associated with CVE-2024-21502?
How can I check PyPI dependencies for CVE-2024-21502?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-ph86-g9r3-5qw4",
"modified" : "2025-02-12T21:59:29Z",
"published" : "2024-02-24T06:30:17Z",
"aliases" : [ "CVE-2024-21502" ],
"summary" : "Uninitialized Variable in fastecdsa",
"details" : "Versions of the package fastecdsa before 2.3.2 use an Uninitialized Variable on the stack, via the curvemath_mul function in src/curveMath.c, due to being used and interpreted as user-defined type. Depending on the variable's actual value it could be arbitrary free(), arbitrary realloc(), null pointer dereference and other. Since the stack can be controlled by the attacker, the vulnerability could be used to corrupt allocator structure, leading to possible heap exploitation. The attacker could cause denial of service by exploiting this vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "fastecdsa"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-21502"
}, {
"type" : "WEB",
"url" : "https://github.com/AntonKueltz/fastecdsa/commit/57fc5689c95d649dab7ef60cc99ac64589f01e36"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/keltecc/49da037072276f21b005a8337c15db26"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/AntonKueltz/fastecdsa"
}, {
"type" : "WEB",
"url" : "https://github.com/AntonKueltz/fastecdsa/blob/v2.3.1/src/curveMath.c%23L210"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-PYTHON-FASTECDSA-6262045"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-457", "CWE-908" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-02-12T21:59:29Z",
"nvd_published_at" : "2024-02-24T05:15:44Z"
}
}