Skip to content

missing clamps for decimal args in external functions

Moderate severity GitHub Reviewed Published Oct 5, 2021 in vyperlang/vyper • Updated Feb 1, 2023

Package

pip vyper (pip)

Affected versions

< 0.3.0

Patched versions

0.3.0

Description

Impact

The following code does not properly validate that its input is in bounds.

@external
def foo(x: decimal) -> decimal:
    return x

Patches

0.3.0 / #2447

Workarounds

Don't use decimal args

References

@charles-cooper charles-cooper published to vyperlang/vyper Oct 5, 2021
Published by the National Vulnerability Database Oct 5, 2021
Reviewed Oct 6, 2021
Published to the GitHub Advisory Database Oct 6, 2021
Last updated Feb 1, 2023

Severity

Moderate
4.3
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Weaknesses

CVE ID

CVE-2021-41122

GHSA ID

GHSA-c7pr-343r-5c46

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.