{"id":"CVE-2022-35961","published":"2022-08-14T00:05:09Z","modified":"2025-04-23T17:50:36Z","title":"ECDSA signature malleability in OpenZeppelin Contracts","vendor":"OpenZeppelin","product":"openzeppelin-contracts","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.9,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00453,"percentile":0.39351,"provenance":"source"},"cwes":[{"id":"CWE-354","name":"Improper Validation of Integrity Check Value"}],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-4h98-2769-gh6h","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3610","tags":["x_refsource_MISC"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.7.3","tags":["x_refsource_MISC"]}],"priority":{"score":13.4,"factors":[{"name":"EPSS percentile","points":7.87},{"name":"CVSS severity","points":5.53}]},"vendorSlug":"openzeppelin","affectedVersions":[{"vendor":"OpenZeppelin","product":"openzeppelin-contracts","versions":[">= 4.1.0, < 4.7.3"]}],"affected":[{"ecosystem":"npm","package":"@openzeppelin/contracts","vulnerableRanges":[">=4.1.0, <4.7.3"],"patched":["4.7.3"],"from":["GHSA-4h98-2769-gh6h"],"provenance":"source"},{"ecosystem":"npm","package":"@openzeppelin/contracts-upgradeable","vulnerableRanges":[">=4.1.0, <4.7.3"],"patched":["4.7.3"],"from":["GHSA-4h98-2769-gh6h"],"provenance":"source"}],"euvd":{"id":"EUVD-2022-6478","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-openzeppelin-contracts-cve-2022-35961","children":[{"from":"CVE-2022-35961","to":"CVE-2026-33895","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-q67f-28xg-22rw","via":"reference","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35961"}]}],"packageHistory":[{"cve":"CVE-2022-31198","published":"2022-08-01","fixed":"4.7.2","kev":false,"link":{"from":"CVE-2022-31198","to":"CVE-2022-35961","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts","fromFixed":"4.7.2","toFixed":"4.7.3","daysApart":13},{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts-upgradeable","fromFixed":"4.7.2","toFixed":"4.7.3","daysApart":13}]}},{"cve":"CVE-2022-35915","published":"2022-08-01","fixed":"4.7.2","kev":false},{"cve":"CVE-2022-35916","published":"2022-08-01","fixed":"4.7.2","kev":false},{"cve":"CVE-2022-35961","published":"2022-08-14","fixed":"4.7.3","kev":false},{"cve":"CVE-2023-26488","published":"2023-03-03","fixed":"4.8.2","kev":false},{"cve":"CVE-2023-30541","published":"2023-04-17","fixed":"4.8.3","kev":false},{"cve":"CVE-2023-30542","published":"2023-04-16","fixed":"4.8.3","kev":false}],"package":"npm:@openzeppelin/contracts"}}