CVE-2021-41122: Bounds check missing for decimal args in Vyper

Published Oct 5, 2021
·
Updated

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

Other sources

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.

— MITRE

Affected Software

2 affected componentsFixes available
pip/vyper<0.3.0
0.3.0
vyperlang vyper<0.3.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/vyper to a version that resolves this vulnerability.

    Fixed in 0.3.0
  2. Upgrade

    Upgrade vyper to a version that resolves this vulnerability.

    Fixed in 0.3.0
  3. Configuration

    Avoid using decimal-typed arguments in external functions in affected versions where decimal bounds are not properly validated.

    Vyper smart contracts Use of decimal arguments in external functions = Do not use decimal args

Event History

Oct 5, 2021
CVE Published
via MITRE·11:00 PM
Data Sourced
via MITRE·11:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:15 PM
DescriptionSeverityWeaknessAffected Software
Oct 6, 2021
Advisory Published
via GitHub·05:48 PM

Frequently Asked Questions

1

What is CVE-2021-41122?

CVE-2021-41122 is a vulnerability in Vyper, a Pythonic Smart Contract Language for the EVM.

2

What is the severity of CVE-2021-41122?

CVE-2021-41122 has a severity rating of 4.3 (medium).

3

How does CVE-2021-41122 affect Vyper users?

CVE-2021-41122 affects Vyper users who are using versions up to 0.2.10.

4

How can I fix CVE-2021-41122?

To fix CVE-2021-41122, users should upgrade to Vyper version 0.3.0 or later.

5

Where can I find more information about CVE-2021-41122?

More information about CVE-2021-41122 can be found in the Vyper GitHub repository and the associated security advisory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203