GHSA-j2x6-9323-fp7h

    Dashboard / Vulnerabilities / GHSA-j2x6-9323-fp7h

    GHSA-j2x6-9323-fp7h

    Published: 22 Apr 2022Last Modified: 8 Nov 2023

    Summary: Integer bounds error in Vyper

    Details: ### Impact in the following code, the return of `<iface>.returns_int128()` is not validated to fall within the bounds of `int128`. as of v0.3.0, `<iface>.returns_int128()` is validated in simple expressions, but not complex expressions. ```vyper interface iface: def returns_int128() -> int128: view def returns_Bytes33() -> Bytes[33]: view x: iface @external def call_out(): x: int128 = self.x.returns_int128() # affected, <0.3.0 y: uint256 = convert(self.x.returns_int128(), uint256) # affected, <0.3.2 z: Bytes[33] = concat(self.x.returns_Bytes33(), b"") # affected >= 0.3.0, <0.3.2 ``` ### Patches 0.3.2 (as of https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b) ### Workarounds Break up operations involving external calls into multiple statements. For instance, instead of the example above, use ``` x: int128 = self.x.returns_int128() y: uint256 = convert(x, uint256) ```

    Affected packages

    Package

    Name: vyper

    Purl: pkg:pypi/vyper

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 0
    Fixed -0.3.2

    Affected versions

    0.1.0b1
    0.1.0b10
    0.1.0b11
    0.1.0b12
    0.1.0b13
    0.1.0b14
    0.1.0b15
    0.1.0b16
    0.1.0b17
    0.1.0b2
    0.1.0b3
    0.1.0b4
    0.1.0b5
    0.1.0b6
    0.1.0b7
    0.1.0b8
    0.1.0b9

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-j2x6-9323-fp7h | CVE-DB