CVE-2022-31153 is a medium-severity (CVSS 6.5) CWE-664 vulnerability in openzeppelin-cairo-contracts. 2 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for openzeppelin-cairo-contracts — see the affected versions and patch details below.
OpenZeppelin Contracts for Cairo account cannot process transactions on Goerli
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-31153.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
openzeppelin-cairo-contractsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Impact
This vulnerability affects all accounts (vanilla and ethereum flavors) in the v0.2.0 release of OpenZeppelin Contracts for Cairo, which are not whitelisted on StarkNet mainnet, so only goerli deployments of v0.2.0 accounts are affected.
This faulty behavior is not observed in StarkNet's testing framework, so don't rely on it passing to detect this issue on custom accounts.
Patches
This bug has been patched in v0.2.1.
References
The issue is detailed in https://github.com/OpenZeppelin/cairo-contracts/issues/386.
For more information
If you have any questions or comments about this advisory:
- Open an issue in the Contracts for Cairo repo
- Email us at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | openzeppelin-cairo-contracts | all versions | 0.2.1pip install --upgrade 'openzeppelin-cairo-contracts==0.2.1' |
Affected Products
contractsopenzeppelinResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for openzeppelin-cairo-contracts, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update openzeppelin-cairo-contracts to 0.2.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-31153 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is CVE-2022-31153 in your dependencies?
Find it across PyPI, including transitive dependencies.