CVE-2023-39363 json
Vyper incorrectly allocated named re-entrancy locks
published 3y ago modified 2mo ago also GHSA-5824-cm3x-3c38 , PYSEC-2023-142 , EUVD-2023-0265
- cvss
- 5.9
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 57%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi vyper 0.3.1
- github.com/vyperlang/vyper#2439 pull request
- github.com/vyperlang/vyper#2514 pull request
- github.com/vyperlang/vyper/security/advisories/GHSA-5824-cm3x-3c38 advisory
Is CVE-2023-39363 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2y ago
Exploit prediction
0.82% chance of exploitation in the next 30 days, higher than 57% of all scored CVEs (FIRST EPSS, 2026-11-15).
Exploits and checks
- github.com https://github.com/vyperlang/vyper/security/advisories/GHSA-5824-cm3x-3c38 referenced PoC, tagged "exploit" by a source, unverified
- hackmd.io https://hackmd.io/@LlamaRisk/BJzSKHNjn referenced PoC, tagged "exploit" by a source, unverified
- hackmd.io https://hackmd.io/@vyperlang/HJUgNMhs2 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 9.1 | 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 |
| CNA | 4.0 | 9.1 | 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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 3.1 | 8.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | vyper | >=0.2.15, <0.3.1 all versions |
0.3.1 |
Affected products
- vyperlang vyper
Classification
- Weakness
-
- CWE-863 Incorrect Authorization
References
-
github.com
/vyperlang/vyper/pull/2439
web, patch
-
github.com
/vyperlang/vyper/pull/2514
web, patch
-
github.com
/vyperlang/vyper/security/advisories/GHSA-5824-cm3x-3c38
web, exploit, patch, third-party-advisory, advisory
-
hackmd.io
/@LlamaRisk/BJzSKHNjn
web, exploit, third-party-advisory
-
hackmd.io
/@vyperlang/HJUgNMhs2
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-39363
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2023-142.yaml
web
-
github.com
/vyperlang/vyper
package
Sources
- CVE List CVE-2023-39363
- GitHub Advisory GHSA-5824-cm3x-3c38
- NVD CVE-2023-39363
- OSV PYSEC-2023-142
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.