{"id":"CVE-2023-39363","published":"2023-08-07T18:40:25Z","modified":"2024-10-11T14:05:03Z","title":"Vyper incorrectly allocated named re-entrancy locks","vendor":"vyperlang","product":"vyper","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.1,"severity":"CRITICAL","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00911,"percentile":0.581,"provenance":"source"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-5824-cm3x-3c38","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vyperlang/vyper/pull/2439","tags":["x_refsource_MISC"]},{"url":"https://github.com/vyperlang/vyper/pull/2514","tags":["x_refsource_MISC"]},{"url":"https://hackmd.io/@LlamaRisk/BJzSKHNjn","tags":["x_refsource_MISC"]},{"url":"https://hackmd.io/@vyperlang/HJUgNMhs2","tags":["x_refsource_MISC"]}],"priority":{"score":18.0,"factors":[{"name":"EPSS percentile","points":11.62},{"name":"CVSS severity","points":6.37}]},"vendorSlug":"vyperlang","affectedVersions":[{"vendor":"vyperlang","product":"vyper","versions":["= 0.2.15","= 0.2.16","= 0.3.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-10-03T18:06:38.040646Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"vyper","vulnerableRanges":[">=0.2.15, <0.3.1","all versions"],"patched":["0.3.1"],"from":["GHSA-5824-cm3x-3c38","PYSEC-2023-142"],"provenance":"source"}],"euvd":{"id":"EUVD-2023-0265","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-41121","published":"2021-10-06","fixed":"0.3.0","kev":false,"link":{"from":"CVE-2021-41121","to":"CVE-2023-39363","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:vyper","fromFixed":"0.3.0","toFixed":"0.3.1","daysApart":670}]}},{"cve":"CVE-2021-41122","published":"2021-10-05","fixed":"0.3.0","kev":false},{"cve":"CVE-2024-32648","published":"2024-04-25","fixed":"0.3.0","kev":false},{"cve":"CVE-2023-39363","published":"2023-08-07","fixed":"0.3.1","kev":false},{"cve":"CVE-2022-24787","published":"2022-04-04","fixed":"0.3.2","kev":false},{"cve":"CVE-2022-24788","published":"2022-04-13","fixed":"0.3.2","kev":false},{"cve":"CVE-2022-24845","published":"2022-04-13","fixed":"0.3.2","kev":false}],"package":"PyPI:vyper"}}