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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.1
- **CVSS:** 9.1 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: High; Availability impact on other systems: High; Exploit maturity: Attacked
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.91% (percentile 58, 2026-11-26)
- **CWE:** CWE-863
- **Aliases:** GHSA-5824-cm3x-3c38, PYSEC-2023-142
- **Published:** 2023-08-07T18:40:25.615Z
- **Modified:** 2026-09-10T03:49:57.451Z

## Who should check

- Projects that depend on PyPI package vyper (\>= 0.2.15, \< 0.3.1)
- Anyone running vyperlang vyper = 0.2.15; = 0.2.16; = 0.3.0

## 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.

## Affected and fixed versions

- PyPI `vyper`: affected \>= 0.2.15, \< 0.3.1; fixed 0.3.1 (osv)
- vyperlang vyper: = 0.2.15; = 0.2.16; = 0.3.0 (cvelist)

## Mitigation

- Upgrade vyper to 0.3.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-39363. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-39363.md
Affected: vyper >= 0.2.15, < 0.3.1
Fixed in: 0.3.1

Steps:
1. Search this machine and project for vyper (PyPI), vyperlang vyper: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-39363 being exploited?

There is no confirmed exploitation: CVE-2023-39363 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.91% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-39363?

Critical: CVSS 9.1 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2023-39363?

vyper \>= 0.2.15, \< 0.3.1.

### Is there a fix for CVE-2023-39363?

Yes. Fixed in 0.3.1. Upgrade vyper to 0.3.1 or later.

### How do I check if I'm affected by CVE-2023-39363?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-39363>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-5824-cm3x-3c38> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2023-142> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-39363> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-39363>
