p PatchFirst

PatchFirst · Latest vulnerabilities

vyper vulnerabilities · Page 2

Vulnerabilities published for vyper in the last 30 days: 7. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 47

  1. CVE-2024-26149

    Low · CVSS 3.7EPSS 0.55%Fix available

    Vyper _abi_decode Memory Overflow

    Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. If an excessively large value is specified as the starting index for an array in `_abi_decode`, it can cause the read position to overflow. This results in the decoding of values outside the intended array bounds, potentially leading to exploitations in contracts that use arrays within `_abi_decode`. This vulnerability affects 0.3.10 and earlier versions.

    • Update to 0.4.0
    • Update to 0.4.0b1
    Published Updated
  2. CVE-2024-24563

    Critical · CVSS 9.8EPSS 1.54%Fix available

    Vyper array negative index vulnerability

    Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. Arrays can be keyed by a signed integer, while they are defined for unsigned integers only. The typechecker doesn't throw when spotting the usage of an `int` as an index for an array. The typechecker allows the usage of signed integers to be used as indexes to arrays. The vulnerability is present in different forms in all versions, including `0.3.10`. For ints, the 2's complement representation is used. Because the array was declared very large, the bounds checking will pass Negative values will simply be represented as very large numbers. As of time of publication,

    • Update to 0.4.0
    • Update to 0.4.0b1
    Published Updated
  3. CVE-2024-24559

    Low · CVSS 3.7EPSS 0.26%Fix available

    Vyper SHA3 code generation bug

    Vyper is a Pythonic Smart Contract Language for the EVM. There is an error in the stack management when compiling the `IR` for `sha3_64`. Concretely, the `height` variable is miscalculated. The vulnerability can't be triggered without writing the `IR` by hand (that is, it cannot be triggered from regular vyper code). `sha3_64` is used for retrieval in mappings. No flow that would cache the `key` was found so the issue shouldn't be possible to trigger when compiling the compiler-generated `IR`. This issue isn't triggered during normal compilation of vyper code so the impact is low. At the time of publication there is no patch available.

    • Update to 0.4.0
    • Update to 0.4.0b1
    Published Updated
  4. CVE-2024-24560

    Low · CVSS 3.7EPSS 0.53%Fix available

    Vyper external calls can overflow return data to return input buffer

    Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. When calls to external contracts are made, we write the input buffer starting at byte 28, and allocate the return buffer to start at byte 0 (overlapping with the input buffer). When checking RETURNDATASIZE for dynamic types, the size is compared only to the minimum allowed size for that type, and not to the returned value's length. As a result, malformed return data can cause the contract to mistake data from the input buffer for returndata. When the called contract returns invalid ABIv2 encoded data, the calling contract can read different invalid data (from the d

    • Update to 0.4.0
    • Update to 0.4.0b1
    Published Updated
  5. CVE-2024-24561

    Critical · CVSS 9.8EPSS 0.9%Fix available

    Vyper bounds check on built-in `slice()` function can be overflowed

    Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In versions 0.3.10 and earlier, the bounds check for slices does not account for the ability for start + length to overflow when the values aren't literals. If a slice() function uses a non-literal argument for the start or length variable, this creates the ability for an attacker to overflow the bounds check. This issue can be used to do OOB access to storage, memory or calldata addresses. It can also be used to corrupt the length slot of the respective array.

    • Update to 0.4.0
    • Update to 0.4.0b1
    Published Updated
  6. CVE-2024-24567

    Medium · CVSS 4.8EPSS 0.48%Fix available

    raw_call `value=` kwargs not disabled for static and delegate calls

    Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. Vyper compiler allows passing a value in builtin raw_call even if the call is a delegatecall or a staticcall. But in the context of delegatecall and staticcall the handling of value is not possible due to the semantics of the respective opcodes, and vyper will silently ignore the value= argument. If the semantics of the EVM are unknown to the developer, he could suspect that by specifying the `value` kwarg, exactly the given amount will be sent along to the target. This vulnerability affects 0.3.10 and earlier versions.

    • Update to 0.4.0
    • Update to 0.4.0b1
    Published Updated
  7. CVE-2024-22419

    High · CVSS 7.3EPSS 0.77%Fix available

    concat built-in can corrupt memory in vyper

    Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. The `concat` built-in can write over the bounds of the memory buffer that was allocated for it and thus overwrite existing valid data. The root cause is that the `build_IR` for `concat` doesn't properly adhere to the API of copy functions (for `>=0.3.2` the `copy_bytes` function). A contract search was performed and no vulnerable contracts were found in production. The buffer overflow can result in the change of semantics of the contract. The overflow is length-dependent and thus it might go unnoticed during contract testing. However, certainly not all usages of con

    • Update to 0.4.0
    • Update to 0.4.0b1
    Published Updated
  8. CVE-2023-46247

    High · CVSS 7.5EPSS 0.69%Fix available

    Vyper has incorrect storage layout for contracts containing large arrays

    Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). Contracts containing large arrays might underallocate the number of slots they need by 1. Prior to v0.3.8, the calculation to determine how many slots a storage variable needed used `math.ceil(type_.size_in_bytes / 32)`. The intermediate floating point step can produce a rounding error if there are enough bits set in the IEEE-754 mantissa. Roughly speaking, if `type_.size_in_bytes` is large (> 2**46), and slightly less than a power of 2, the calculation can overestimate how many slots are needed by 1. If `type_.size_in_bytes` is slightly more than a power of 2

    • Update to 0.3.8
    Published Updated
  9. CVE-2023-42460

    Medium · CVSS 5.3EPSS 0.67%Fix available

    _abi_decode input not validated in complex expressions in Vyper

    Vyper is a Pythonic Smart Contract Language for the EVM. The `_abi_decode()` function does not validate input when it is nested in an expression. Uses of `_abi_decode()` can be constructed which allow for bounds checking to be bypassed resulting in incorrect results. This issue has not yet been fixed, but a fix is expected in release `0.3.10`. Users are advised to reference pull request #3626.

    • Update to 0.3.10
    Published Updated
  10. CVE-2023-42443

    High · CVSS 8.1EPSS 0.83%Fix available

    Vyper vulnerable to memory corruption in certain builtins utilizing `msize`

    Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). In version 0.3.9 and prior, under certain conditions, the memory used by the builtins `raw_call`, `create_from_blueprint` and `create_copy_of` can be corrupted. For `raw_call`, the argument buffer of the call can be corrupted, leading to incorrect `calldata` in the sub-context. For `create_from_blueprint` and `create_copy_of`, the buffer for the to-be-deployed bytecode can be corrupted, leading to deploying incorrect bytecode. Each builtin has conditions that must be fulfilled for the corruption to happen. For `raw_call`, the `data` argument of the builtin mu

    • Update to 0.3.10
    Published Updated
  11. CVE-2023-42441

    Medium · CVSS 5.3EPSS 0.51%Fix available

    Vyper has incorrect re-entrancy lock when key is empty string

    Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). Starting in version 0.2.9 and prior to version 0.3.10, locks of the type `@nonreentrant("")` or `@nonreentrant('')` do not produce reentrancy checks at runtime. This issue is fixed in version 0.3.10. As a workaround, ensure the lock name is a non-empty string.

    • Update to 0.3.10
    Published Updated
  12. CVE-2023-40015

    Low · CVSS 3.7EPSS 0.49%Fix available

    Vyper: reversed order of side effects for some operations

    Vyper is a Pythonic Smart Contract Language. For the following (probably non-exhaustive) list of expressions, the compiler evaluates the arguments from right to left instead of left to right. `unsafe_add, unsafe_sub, unsafe_mul, unsafe_div, pow_mod256, |, &, ^ (bitwise operators), bitwise_or (deprecated), bitwise_and (deprecated), bitwise_xor (deprecated), raw_call, <, >, <=, >=, ==, !=, in, not in (when lhs and rhs are enums)`. This behaviour becomes a problem when the evaluation of one of the arguments produces side effects that other arguments depend on. The following expressions can produce side-effect: state modifying external call , sta

    • Update to 0.3.10rc1
    Published Updated
  13. CVE-2023-41052

    Low · CVSS 3.7EPSS 0.54%Fix available

    Vyper: incorrect order of evaluation of side effects for some builtins

    Vyper is a Pythonic Smart Contract Language. In affected versions the order of evaluation of the arguments of the builtin functions `uint256_addmod`, `uint256_mulmod`, `ecadd` and `ecmul` does not follow source order. This behaviour is problematic when the evaluation of one of the arguments produces side effects that other arguments depend on. A patch is currently being developed on pull request #3583. When using builtins from the list above, users should make sure that the arguments of the expression do not produce side effects or, if one does, that no other argument is dependent on those side effects.

    • Update to 0.3.10
    • Update to 0.3.10rc1
    Published Updated
  14. CVE-2023-39363

    Critical · CVSS 9.1EPSS 0.82%Fix available

    Vyper incorrectly allocated named re-entrancy locks

    Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). In versions 0.2.15, 0.2.16 and 0.3.0, named re-entrancy locks are allocated incorrectly. Each function using a named re-entrancy lock gets a unique lock regardless of the key, allowing cross-function re-entrancy in contracts compiled with the susceptible versions. A specific set of conditions is required to result in misbehavior of affected contracts, specifically: a `.vy` contract compiled with `vyper` versions `0.2.15`, `0.2.16`, or `0.3.0`; a primary function that utilizes the `@nonreentrant` decorator with a specific `key` and does not strictly follow the

    • Update to 0.3.1
    Published Updated
  15. CVE-2023-37902

    Medium · CVSS 5.3EPSS 0.57%Fix available

    Vyper's ecrecover can return undefined data if signature does not verify

    Vyper is a Pythonic programming language that targets the Ethereum Virtual Machine (EVM). Prior to version 0.3.10, the ecrecover precompile does not fill the output buffer if the signature does not verify. However, the ecrecover builtin will still return whatever is at memory location 0. This means that the if the compiler has been convinced to write to the 0 memory location with specially crafted data (generally, this can happen with a hashmap access or immutable read) just before the ecrecover, a signature check might pass on an invalid signature. Version 0.3.10 contains a patch for this issue.

    • Update to 0.3.10
    • Update to 0.3.9
    Published Updated
  16. CVE-2023-32675

    Low · CVSS 3.7EPSS 0.55%Fix available

    Nonpayable default functions are sometimes payable in vyper

    Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In contracts with more than one regular nonpayable function, it is possible to send funds to the default function, even if the default function is marked `nonpayable`. This applies to contracts compiled with vyper versions prior to 0.3.8. This issue was fixed by the removal of the global `calldatasize` check in commit `02339dfda`. Users are advised to upgrade to version 0.3.8. Users unable to upgrade should avoid use of nonpayable default functions.

    • Update to 0.3.8
    Published Updated
  17. CVE-2023-32059

    High · CVSS 7.5EPSS 0.73%Fix available

    Vyper vulnerable to incorrect ordering of arguments for kwargs passed to internal calls

    Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Prior to version 0.3.8, internal calls with default arguments are compiled incorrectly. Depending on the number of arguments provided in the call, the defaults are added not right-to-left, but left-to-right. If the types are incompatible, typechecking is bypassed. The ability to pass kwargs to internal functions is an undocumented feature that is not well known about. The issue is patched in version 0.3.8.

    • Update to 0.3.8
    Published Updated
  18. CVE-2023-32058

    High · CVSS 7.5EPSS 0.91%Fix available

    Vyper vulnerable to integer overflow in loop

    Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Prior to version 0.3.8, due to missing overflow check for loop variables, by assigning the iterator of a loop to a variable, it is possible to overflow the type of the latter. The issue seems to happen only in loops of type `for i in range(a, a + N)` as in loops of type `for i in range(start, stop)` and `for i in range(stop)`, the compiler is able to raise a `TypeMismatch` when trying to overflow the variable. The problem has been patched in version 0.3.8.

    • Update to 0.3.8
    Published Updated
  19. CVE-2023-31146

    High · CVSS 7.5EPSS 1.24%Fix available

    Vyper vulnerable to OOB DynArray access when array is on both LHS and RHS of an assignment

    Vyper is a Pythonic smart contract language for the Ethereum virtual machine. Prior to version 0.3.8, during codegen, the length word of a dynarray is written before the data, which can result in out-of-bounds array access in the case where the dynarray is on both the lhs and rhs of an assignment. The issue can cause data corruption across call frames. The expected behavior is to revert due to out-of-bounds array access. Version 0.3.8 contains a patch for this issue.

    • Update to 0.3.8
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →