Improper Validation of Specified Quantity in Input Affecting vyper package, versions [,0.3.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.26% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-VYPER-22132608
  • published2 Nov 2026
  • disclosed21 Oct 2026
  • creditUnknown

Introduced: 21 Oct 2026

NewCVE-2020-37289  (opens in a new tab)
CWE-1284  (opens in a new tab)

How to fix?

Upgrade vyper to version 0.3.1 or higher.

Overview

vyper is a Pythonic Smart Contract Language for the EVM.

Affected versions of this package are vulnerable to Improper Validation of Specified Quantity in Input via the absence of a uint8 type, which causes interface return values declared as uint8 (such as ERC20.decimals()) to be stored into uint256 variables without bounds checking. Because the ABI encodes uint8 return values as 32-byte integers, a malicious contract can return a value greater than 255, allowing an attacker to manipulate or bypass contract logic that relies on the assumption that the value is within the uint8 range.

Workaround

Insert an explicit bounds assertion after reading any interface value declared as uint8, for example: assert decimals < 256.

References

CVSS Base Scores

version 4.0
version 3.1