{"id":"CVE-2022-31172","aliases":["CVE-2022-31172","GHSA-4g63-c64m-25w9"],"related":[],"kind":"vulnerability","state":"published","title":"OpenZeppelin Contracts's SignatureChecker may revert on invalid EIP-1271 signers","summary":"OpenZeppelin Contracts is a library for smart contract development. Versions 4.1.0 until 4.7.1 are vulnerable to the SignatureChecker reverting. `SignatureChecker.isValidSignatureNow` is not expected to revert. However, an incorrect assumption about Solidity 0.8's `abi.decode` allows some cases to revert, given a target contract that doesn't implement EIP-1271 as expected. The contracts that may be affected are those that use `SignatureChecker` to check the validity of a signature and handle invalid signatures in a way other than reverting. The issue was patched in version 4.7.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OpenZeppelin Contracts is a library for smart contract development. Versions 4.1.0 until 4.7.1 are vulnerable to the SignatureChecker reverting. `SignatureChecker.isValidSignatureNow` is not expected to revert. However, an incorrect assumption about Solidity 0.8's `abi.decode` allows some cases to revert, given a target contract that doesn't implement EIP-1271 as expected. The contracts that may be affected are those that use `SignatureChecker` to check the validity of a signature and handle invalid signatures in a way other than reverting. The issue was patched in version 4.7.1.","source":"cvelist"},{"lang":"en","text":"### Impact\n\n`SignatureChecker.isValidSignatureNow` is not expected to revert. However, an incorrect assumption about Solidity 0.8's `abi.decode` allows some cases to revert, given a target contract that doesn't implement EIP-1271 as expected.\n\nThe contracts that may be affected are those that use `SignatureChecker` to check the validity of a signature and handle invalid signatures in a way other than reverting. We believe this to be unlikely.\n\n### Patches\n\nThe issue was patched in 4.7.1.\n\n### References\n\nhttps://github.com/OpenZeppelin/openzeppelin-contracts/pull/3552\n\n### For more information\n\nIf you have any questions or comments about this advisory, or need assistance deploying the fix, email us at [security@openzeppelin.com](mailto:security@openzeppelin.com).","format":"markdown","source":"ghsa"},{"lang":"es","text":"OpenZeppelin Contracts es una biblioteca para el desarrollo de contratos inteligentes. Las versiones 4.1.0 hasta 4.7.1, son vulnerables a una reversión de SignatureChecker. No es esperado que \"SignatureChecker.isValidSignatureNow\" revierta. Sin embargo, una suposición incorrecta sobre \"abi.decode\" de Solidity versión 0.8 permite que algunos casos sean revertidos, dado un contrato de destino que no implementa EIP-1271 como es esperado. Los contratos que pueden verse afectados son los que usan \"SignatureChecker\" para comprobar la validez de una firma y manejar las firmas no válidas de una forma distinta a la reversión. El problema fue parcheado en versión 4.7.1","source":"nvd"}],"published":"2022-07-21T13:55:11.000Z","modified":"2026-06-17T04:44:57.457Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-20","CWE-347"],"affected":[{"ranges":[{"version":">= 4.1.0, < 4.7.1","status":"affected"}],"vendor":"OpenZeppelin","product":"openzeppelin-contracts","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.1.0","status":"affected","fixed":"4.7.1"}],"ecosystem":"npm","package":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.1.0","status":"affected","fixed":"4.7.1"}],"ecosystem":"npm","package":"@openzeppelin/contracts-upgradeable","purl":"pkg:npm/%40openzeppelin/contracts-upgradeable","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.1.0","fixed":"4.7.1"}],"vendor":"openzeppelin","product":"contracts","cpe":"cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-4g63-c64m-25w9","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3552","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31172","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-04-23T15:53:13.610Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-31172","url":"https://www.cve.org/CVERecord?id=CVE-2022-31172","licence":"CVE Terms of Use","modified":"2025-04-23T17:57:33.239Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4g63-c64m-25w9","url":"https://github.com/advisories/GHSA-4g63-c64m-25w9","licence":"CC-BY-4.0","modified":"2023-11-08T04:09:28.648Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-31172","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31172","licence":"Public domain","modified":"2026-06-17T04:44:57.457Z"}],"updatedAt":"2026-11-25T22:58:13.159Z","epss":{"score":0.00515,"percentile":0.45349,"date":"2026-12-01T12:00:22.000Z"}}