{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-24787","id":"CVE-2022-24787","title":"Incorrect Comparison in Vyper","description":"Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. In version 0.3.1 and prior, bytestrings can have dirty bytes in them, resulting in the word-for-word comparisons giving incorrect results. Even without dirty nonzero bytes, two bytestrings can compare to equal if one ends with `\"\\x00\"` because there is no comparison of the length. A patch is available and expected to be ","descriptionLong":"Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine. In version 0.3.1 and prior, bytestrings can have dirty bytes in them, resulting in the word-for-word comparisons giving incorrect results. Even without dirty nonzero bytes, two bytestrings can compare to equal if one ends with `\"\\x00\"` because there is no comparison of the length. A patch is available and expected to be part of the 0.3.2 release. There are currently no known workarounds.","published":"2022-04-04T17:35:10.000Z","updated":"2026-10-28T02:31:02.106264239Z","reserved":"2022-02-10T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"GitHub"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"high","products":["vyperlang vyper"],"affectedProducts":[{"vendor":"vyperlang","product":"vyper","defaultStatus":null,"versions":[{"status":"affected","version":"<= 0.3.1"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"vyper","purl":"pkg:pypi/vyper","ranges":["<0.3.2"],"fixed":["0.3.2"],"advisory":"GHSA-7vrm-3jc8-5wwm"}],"cwes":["CWE-697"],"aliases":["GHSA-7vrm-3jc8-5wwm","PYSEC-2022-196"],"references":[{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-7vrm-3jc8-5wwm","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","advisory","web"]},{"url":"https://github.com/vyperlang/vyper/commit/2c73f8352635c0a433423a5b94740de1a118e508","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24787.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24787","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/vyper/PYSEC-2022-196.yaml","tags":["web"]},{"url":"https://github.com/vyperlang/vyper","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial"},"epss":0.01029,"epssPercentile":0.64384,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-24787","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24787","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-24787","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-7vrm-3jc8-5wwm","ok":true,"note":"GHSA-7vrm-3jc8-5wwm"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-24787","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}