# CVE-2023-39363: Vyper incorrectly allocated named re-entrancy locks

- Severity: Critical 9.1 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:H/SA:H/E:A`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.82%, higher than 58% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 3 links below, marked "exploit"
- Published: 2023-08-07T18:40:25.615Z
- Modified: 2026-09-10T03:49:57.451Z
- Also known as: GHSA-5824-cm3x-3c38, PYSEC-2023-142
- Weaknesses: CWE-863
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). In versions 0.2.15, 0.2.16 and 0.3.0, named re-entrancy locks are allocated incorrectly. Each function using a named re-entrancy lock gets a unique lock regardless of the key, allowing cross-function re-entrancy in contracts compiled with the susceptible versions. A specific set of conditions is required to result in misbehavior of affected contracts, specifically: a `.vy` contract compiled with `vyper` versions `0.2.15`, `0.2.16`, or `0.3.0`; a primary function that utilizes the `@nonreentrant` decorator with a specific `key` and does not strictly follow the check-effects-interaction pattern (i.e. contains an external call to an untrusted party before storage updates); and a secondary function that utilizes the same `key` and would be affected by the improper state caused by the primary function. Version 0.3.1 contains a fix for this issue.

(As written by CVE List.)

## Affected

- vyperlang vyper: = 0.2.15; = 0.2.16; = 0.3.0; 0.2.15; 0.2.16; 0.3.0
- vyper (PyPI): from 0.2.15 before 0.3.1; all versions

## Every score

- GitHub_M: CVSS:4.0 9.1 Critical `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:H/SA:H/E:A`
- GitHub: CVSS:3.1 8.7 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:H/SA:H/E:A`
- NVD: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`
- PyPA Advisory Database: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://github.com/vyperlang/vyper/security/advisories/GHSA-5824-cm3x-3c38> (exploit, advisory, patch, third-party-advisory, web)
- <https://hackmd.io/@LlamaRisk/BJzSKHNjn> (exploit, third-party-advisory, web)
- <https://hackmd.io/@vyperlang/HJUgNMhs2> (exploit, third-party-advisory, web)
- <https://github.com/vyperlang/vyper/pull/2439> (fix, patch, web)
- <https://github.com/vyperlang/vyper/pull/2514> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-39363> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2023-142.yaml> (web)
- <https://github.com/vyperlang/vyper> (package)

## Sources

- CVE List: [CVE-2023-39363](https://www.cve.org/CVERecord?id=CVE-2023-39363), CVE Terms of Use, modified 2024-10-11
- GitHub Advisory Database: [GHSA-5824-cm3x-3c38](https://github.com/advisories/GHSA-5824-cm3x-3c38), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-39363](https://nvd.nist.gov/vuln/detail/CVE-2023-39363), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-142](https://osv.dev/vulnerability/PYSEC-2023-142), CC-BY-4.0, modified 2025-10-09

---

Page: https://cve.day/CVE-2023-39363 · Whole record: https://cve.day/CVE-2023-39363.json · Rebuilt by cve.day 2026-11-25T22:58:26.829Z
