{"id":"CVE-2021-41122","aliases":["GHSA-c7pr-343r-5c46","PYSEC-2021-366"],"title":"missing clamps for decimal args in external functions","summary":"missing clamps for decimal args in external functions","severity":"medium","cvss":4.3,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","vendor":"vyper","product":"vyper","ecosystem":"pip","affected":["vyper < 0.3.0"],"patched":["vyper 0.3.0"],"published":"2021-10-06","updated":"2026-07-08","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-c7pr-343r-5c46","references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-c7pr-343r-5c46"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41122"},{"url":"https://github.com/vyperlang/vyper/pull/2447"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2021-366.yaml"},{"url":"https://github.com/vyperlang/vyper"}],"tags":["osv","pip"],"epss":0.00803,"epssPercentile":0.55202,"ingestedAt":"2026-07-08T18:25:48.334Z","slug":"CVE-2021-41122","body":"## Overview\n\n### 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\n\n\n\n## Affected packages\n\n- `vyper < 0.3.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `vyper 0.3.0`","depth":"sunlit","depthScore":24,"depthScoreParts":{"impact":23.7,"likelihood":0.2,"exploitation":0,"ransomware":0},"changes":[]}