{"id":"CVE-2022-35961","summary":"ECDSA signature malleability in OpenZeppelin Contracts","details":"OpenZeppelin Contracts is a library for secure smart contract development. The functions `ECDSA.recover` and `ECDSA.tryRecover` are vulnerable to a kind of signature malleability due to accepting EIP-2098 compact signatures in addition to the traditional 65 byte signature format. This is only an issue for the functions that take a single `bytes` argument, and not the functions that take `r, v, s` or `r, vs` as separate arguments. The potentially affected contracts are those that implement signature reuse or replay protection by marking the signature itself as used rather than the signed message or a nonce included in it. A user may take a signature that has already been submitted, submit it again in a different form, and bypass this protection. The issue has been patched in 4.7.3.","aliases":["GHSA-4h98-2769-gh6h"],"modified":"2026-08-12T03:51:42.138664455Z","published":"2022-08-14T00:05:09Z","database_specific":{"cwe_ids":["CWE-354"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35961.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.7.3"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35961.json"},{"type":"ADVISORY","url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-4h98-2769-gh6h"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35961"},{"type":"FIX","url":"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3610"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/openzeppelin/openzeppelin-contracts","events":[{"introduced":"23869e5b2a7c6b9c3e27dee4289615b8cf50e36b"},{"fixed":"ecd2ca2cd7cac116f7a37d0e474bbb3d7d5e1c4d"}],"database_specific":{"source":["AFFECTED_FIELD","CPE_RANGE","REFERENCES"],"cpe":["cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:*","cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:*"],"extracted_events":[{"introduced":"4.1.0"},{"fixed":"4.7.3"}]}},{"type":"GIT","repo":"https://github.com/openzeppelin/openzeppelin-contracts-upgradeable","events":[{"introduced":"2af7375b7b2f82224272d823c1151d4d5d0633c4"},{"fixed":"0a2cb9a445c365870ed7a8ab461b12acf3e27d63"}],"database_specific":{"source":"CPE_RANGE","cpe":"cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:*","extracted_events":[{"introduced":"4.1.0"},{"fixed":"4.7.3"}]}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-35961.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L"}]}