{"api_version":"1","generated_at":"2026-04-23T15:11:10+00:00","cve":"CVE-2022-24787","urls":{"html":"https://cve.report/CVE-2022-24787","api":"https://cve.report/api/cve/CVE-2022-24787.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-24787","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-24787"},"summary":{"title":"CVE-2022-24787","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 part of the 0.3.2 release. There are currently no known workarounds.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-04-04 18:15:00","updated_at":"2023-08-02 16:22:00"},"problem_types":["CWE-697"],"metrics":[],"references":[{"url":"https://github.com/vyperlang/vyper/commit/2c73f8352635c0a433423a5b94740de1a118e508","name":"https://github.com/vyperlang/vyper/commit/2c73f8352635c0a433423a5b94740de1a118e508","refsource":"MISC","tags":[],"title":"Merge pull request from GHSA-7vrm-3jc8-5wwm · vyperlang/vyper@2c73f83 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-7vrm-3jc8-5wwm","name":"https://github.com/vyperlang/vyper/security/advisories/GHSA-7vrm-3jc8-5wwm","refsource":"CONFIRM","tags":[],"title":"bytestring equality incorrect for Bytes[N<=32] · Advisory · vyperlang/vyper · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-24787","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24787","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"24787","vulnerable":"1","versionEndIncluding":"0.3.1","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"vyperlang","cpe5":"vyper","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"24787","vulnerable":"1","versionEndIncluding":"0.3.1","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"vyper_project","cpe5":"vyper","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2022-24787","STATE":"PUBLIC","TITLE":"Incorrect Comparison in Vyper"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"vyper","version":{"version_data":[{"version_value":"<= 0.3.1"}]}}]},"vendor_name":"vyperlang"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-697: Incorrect Comparison"}]}]},"references":{"reference_data":[{"name":"https://github.com/vyperlang/vyper/security/advisories/GHSA-7vrm-3jc8-5wwm","refsource":"CONFIRM","url":"https://github.com/vyperlang/vyper/security/advisories/GHSA-7vrm-3jc8-5wwm"},{"name":"https://github.com/vyperlang/vyper/commit/2c73f8352635c0a433423a5b94740de1a118e508","refsource":"MISC","url":"https://github.com/vyperlang/vyper/commit/2c73f8352635c0a433423a5b94740de1a118e508"}]},"source":{"advisory":"GHSA-7vrm-3jc8-5wwm","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-04-04 18:15:00","lastModifiedDate":"2023-08-02 16:22:00","problem_types":["CWE-697"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"HIGH","availabilityImpact":"NONE","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:N/I:P/A:N","accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"NONE","integrityImpact":"PARTIAL","availabilityImpact":"NONE","baseScore":5},"severity":"MEDIUM","exploitabilityScore":10,"impactScore":2.9,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:vyperlang:vyper:*:*:*:*:*:*:*:*","versionEndIncluding":"0.3.1","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2022","CveId":"24787","Ordinal":"228317","Title":"CVE-2022-24787","CVE":"CVE-2022-24787","Year":"2022"},"notes":[{"CveYear":"2022","CveId":"24787","Ordinal":"1","NoteData":"** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.","Type":"Description","Title":null}]}}}