CVE-2022-35961 json
ECDSA signature malleability in OpenZeppelin Contracts
published 4y ago modified 4mo ago also GHSA-4h98-2769-gh6h , EUVD-2022-6478
- cvss
- 7.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 39%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm @openzeppelin/contracts 4.7.3
- npm @openzeppelin/contracts-upgradeable 4.7.3
- openzeppelin contracts 4.7.3
- openzeppelin contracts_upgradeable 4.7.3
Is CVE-2022-35961 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
0.45% chance of exploitation in the next 30 days, higher than 39% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.9 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L |
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 3.1 | 7.9 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @openzeppelin/contracts | >=4.1.0, <4.7.3 |
4.7.3 |
| npm | @openzeppelin/contracts-upgradeable | >=4.1.0, <4.7.3 |
4.7.3 |
Affected products
- OpenZeppelin openzeppelin-contracts
Classification
- Weakness
-
- CWE-354 Improper Validation of Integrity Check Value
References
-
github.com
/OpenZeppelin/openzeppelin-contracts/pull/3610
web, patch, third-party-advisory
-
github.com
/OpenZeppelin/openzeppelin-contracts/commit/d693d89d99325f395182e4f547dbf5ff8e5c3c87
web
-
github.com
/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-4h98-2769-gh6h
web, third-party-advisory
-
github.com
/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.7.3
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-35961
advisory
-
github.com
/OpenZeppelin/openzeppelin-contracts
package
Sources
- CVE List CVE-2022-35961
- GitHub Advisory GHSA-4h98-2769-gh6h
- NVD CVE-2022-35961
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.