medium4.3
CVE-2021-41122
missing clamps for decimal args in external functions
Impact
### Impact The following code does not properly validate that its input is in bounds. ```python @external def foo(x: decimal) -> decimal: return x ``` ### Patches 0.3.0 / #2447 ### Workarounds Don't use decimal args
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | vyper | < 0.3.0 | 0.3.0 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Vyperlang | Vyper | before 0.3.0 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/vyperlang/vyper/pull/2447
- https://github.com/vyperlang/vyper/security/advisories/GHSA-c7pr-343r-5c46
- https://github.com/advisories/GHSA-c7pr-343r-5c46
- https://nvd.nist.gov/vuln/detail/CVE-2021-41122
- https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2021-366.yaml