{"id":"CVE-2022-24845","aliases":["GHSA-j2x6-9323-fp7h","PYSEC-2022-198"],"url":"https://o3.security/vulnerability/CVE-2022-24845","summary":"Integer bounds error in Vyper","details":"### Impact\nin 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.\n```vyper\ninterface iface:\n    def returns_int128() -> int128: view\n    def returns_Bytes33() -> Bytes[33]: view\n\nx: iface\n \n@external\ndef call_out():\n    x: int128 = self.x.returns_int128()  # affected, <0.3.0\n    y: uint256 = convert(self.x.returns_int128(), uint256)  # affected, <0.3.2\n    z: Bytes[33] = concat(self.x.returns_Bytes33(), b\"\")  # affected >= 0.3.0, <0.3.2\n```\n\n### Patches\n0.3.2 (as of https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b)\n\n### Workarounds\nBreak up operations involving external calls into multiple statements. For instance, instead of the example above, use\n```\nx: int128 = self.x.returns_int128()\ny: uint256 = convert(x, uint256)\n```","published":"2022-04-13T21:15:16Z","modified":"2026-08-12T03:51:09.882697467Z","cvss":{"score":8.8,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"PyPI","name":"vyper","fixedVersion":"0.3.2"}],"fix":{"url":"https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b","label":"vyperlang/vyper@049dbdc"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24845.json"},{"type":"ADVISORY","url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-j2x6-9323-fp7h"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24845"},{"type":"FIX","url":"https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2022-198.yaml"},{"type":"PACKAGE","url":"https://github.com/vyperlang/vyper"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:09.882697467Z"}}