{"id":"CVE-2021-41122","aliases":["CVE-2021-41122","GHSA-c7pr-343r-5c46","PYSEC-2021-366"],"related":[],"kind":"vulnerability","state":"published","title":"Bounds check missing for decimal args in Vyper","summary":"Vyper is a Pythonic Smart Contract Language for the EVM. In affected versions external functions did not properly validate the bounds of decimal arguments. The can lead to logic errors. This issue has been resolved in version 0.3.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Vyper is a Pythonic Smart Contract Language for the EVM. In affected versions external functions did not properly validate the bounds of decimal arguments. The can lead to logic errors. This issue has been resolved in version 0.3.0.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe following code does not properly validate that its input is in bounds.\n\n```python\n@external\ndef foo(x: decimal) -> decimal:\n    return x\n```\n\n### Patches\n0.3.0 / #2447\n\n### Workarounds\nDon't use decimal args","format":"markdown","source":"ghsa"},{"lang":"es","text":"Vyper es un lenguaje de contrato inteligente de Python para el EVM. En las versiones afectadas, las funciones externas no comprueban correctamente los límites de los argumentos decimales. Esto puede conllevar a errores lógicos. Este problema ha sido resuelto en la versión 0.3.0","source":"nvd"}],"published":"2021-10-05T23:00:11.000Z","modified":"2026-07-08T06:29:21.993Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:N/I:P/A:N","score":4,"rating":"MEDIUM"}],"cwes":["CWE-682"],"affected":[{"ranges":[{"version":"< 0.3.0","status":"affected"}],"vendor":"vyperlang","product":"vyper","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.3.0"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.3.0"}],"vendor":"vyperlang","product":"vyper","cpe":"cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.3.0"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","source":"pysec"}],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-c7pr-343r-5c46","tags":["advisory","exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/vyperlang/vyper/pull/2447","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41122","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2021-366.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/vyperlang/vyper","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-41122","url":"https://www.cve.org/CVERecord?id=CVE-2021-41122","licence":"CVE Terms of Use","modified":"2024-08-04T02:59:31.578Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-c7pr-343r-5c46","url":"https://github.com/advisories/GHSA-c7pr-343r-5c46","licence":"CC-BY-4.0","modified":"2026-07-08T06:29:21.993Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-41122","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41122","licence":"Public domain","modified":"2026-06-17T04:07:54.980Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-366","url":"https://osv.dev/vulnerability/PYSEC-2021-366","licence":"CC-BY-4.0","modified":"2023-11-08T04:06:51.916Z"}],"updatedAt":"2026-11-25T22:58:04.318Z","epss":{"score":0.00803,"percentile":0.57859,"date":"2026-12-01T12:00:22.000Z"}}