{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-39363","id":"CVE-2023-39363","title":"Vyper incorrectly allocated named re-entrancy locks","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 ","descriptionLong":"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.","published":"2023-08-07T18:40:25.615Z","updated":"2026-10-28T02:30:30.076966957Z","reserved":"2023-07-28T13:26:46.480Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"4.0","score":9.1,"vector":"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","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"4.0","score":9.1,"vector":"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","rating":"critical","source":"GitHub_M"},{"version":"4.0","score":9.1,"vector":"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","rating":"critical","source":"github.com"},{"version":"4.0","score":null,"vector":"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"vector":"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","rating":"high","source":"GitHub"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":8.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H","rating":"high","source":"GitHub"},{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"OSV"}],"rating":"critical","products":["vyperlang vyper"],"affectedProducts":[{"vendor":"vyperlang","product":"vyper","defaultStatus":null,"versions":[{"version":"= 0.2.15","status":"affected"},{"version":"= 0.2.16","status":"affected"},{"version":"= 0.3.0","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"vyper","purl":"pkg:pypi/vyper","ranges":[">=0.2.15 <0.3.1","all versions"],"fixed":["0.3.1"],"advisory":"GHSA-5824-cm3x-3c38"}],"cwes":["CWE-863"],"aliases":["GHSA-5824-cm3x-3c38","PYSEC-2023-142"],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-5824-cm3x-3c38","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Patch","Third Party Advisory","advisory","web"]},{"url":"https://github.com/vyperlang/vyper/pull/2439","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/vyperlang/vyper/pull/2514","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://hackmd.io/@LlamaRisk/BJzSKHNjn","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://hackmd.io/@vyperlang/HJUgNMhs2","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/39xxx/CVE-2023-39363.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39363","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2023-142.yaml","tags":["web"]},{"url":"https://github.com/vyperlang/vyper","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00821,"epssPercentile":0.58064,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-39363","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39363","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-39363","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-5824-cm3x-3c38","ok":true,"note":"GHSA-5824-cm3x-3c38"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-39363","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}