{"id":"CVE-2022-24845","aliases":["CVE-2022-24845","GHSA-j2x6-9323-fp7h","PYSEC-2022-198"],"related":[],"kind":"vulnerability","state":"published","title":"Integer bounds error in Vyper","summary":"Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In affected versions, the return of `<iface>.returns_int128()` is not validated to fall within the bounds of `int128`. This issue can result in a misinterpretation of the integer value and lead to incorrect behavior. As of v0.3.0, `<iface>.returns_int128()` is validated in simple expressions, but not complex expressions. Users are advised to upgrade. There is no known workaround for this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Vyper is a pythonic Smart Contract Language for the ethereum virtual machine. In affected versions, the return of `<iface>.returns_int128()` is not validated to fall within the bounds of `int128`. This issue can result in a misinterpretation of the integer value and lead to incorrect behavior. As of v0.3.0, `<iface>.returns_int128()` is validated in simple expressions, but not complex expressions. Users are advised to upgrade. There is no known workaround for this issue.","source":"cvelist"},{"lang":"en","text":"### 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```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Vyper es un Lenguaje de Contrato Inteligente pitónico para la máquina virtual de Ethereum. En las versiones afectadas, el retorno de \"(iface).returns_int128()\" no es comprobado que esté dentro de los límites de \"int128\". Este problema puede resultar en una mala interpretación del valor entero y conllevar a un comportamiento incorrecto. A partir de la versión 0.3.0, \"(iface).returns_int128()\" es comprobado en expresiones simples, pero no en expresiones complejas. Es recomendado a usuarios actualizar. No se presenta medidas de mitigación conocidas para este problema","source":"nvd"}],"published":"2022-04-13T21:15:16.000Z","modified":"2026-06-17T04:32:38.777Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-190"],"affected":[{"ranges":[{"version":"< 0.3.2","status":"affected"}],"vendor":"vyperlang","product":"vyper","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.3.2"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.3.2"}],"vendor":"vyperlang","product":"vyper","cpe":"cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"049dbdc647b2ce838fae7c188e6bb09cf16e470b"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.3.2"}],"ecosystem":"PyPI","package":"vyper","purl":"pkg:pypi/vyper","repo":"https://github.com/vyperlang/vyper","source":"pysec"}],"references":[{"url":"https://github.com/vyperlang/vyper/commit/049dbdc647b2ce838fae7c188e6bb09cf16e470b","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-j2x6-9323-fp7h","tags":["advisory","exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24845","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2022-198.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/vyperlang/vyper","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-04-22T15:43:42.992Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-24845","url":"https://www.cve.org/CVERecord?id=CVE-2022-24845","licence":"CVE Terms of Use","modified":"2025-04-22T18:15:47.013Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j2x6-9323-fp7h","url":"https://github.com/advisories/GHSA-j2x6-9323-fp7h","licence":"CC-BY-4.0","modified":"2023-11-08T04:08:38.494Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-24845","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24845","licence":"Public domain","modified":"2026-06-17T04:32:38.777Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-198","url":"https://osv.dev/vulnerability/PYSEC-2022-198","licence":"CC-BY-4.0","modified":"2023-11-08T04:08:38.494Z"}],"updatedAt":"2026-11-25T22:58:10.620Z","epss":{"score":0.01426,"percentile":0.73778,"date":"2026-12-02T12:00:21.000Z"}}