Vulnerability · Published Jul 15, 2022 · Assigned by GitHub_M
CVE-2022-31153OpenZeppelin Contracts for Cairo account cannot process transactions on Goerli
Medium 6.5
In plain English
A medium-severity security flaw in cairo-contracts from OpenZeppelin. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 74% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
OpenZeppelin Contracts for Cairo is a library for contract development written in Cairo for StarkNet, a decentralized ZK Rollup. Version 0.2.0 is vulnerable to an error that renders account contracts unusable on live networks. This issue 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. Only goerli deployments of v0.2.0 accounts are affected. This faulty behavior is not observed in StarkNet's testing framework. This bug has been patched in v0.2.1.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | openzeppelin-cairo-contracts | 0.2.1 | GHSA-8mjr-jr5h-q2xr |
| PyPI | openzeppelin-cairo-contracts | 0.2.1 | PYSEC-2026-890 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| OpenZeppelin | cairo-contracts | = 0.2.0 |
Weakness: CWE-664 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-8mjr-jr5h-q2xr x_refsource_CONFIRM
- https://github.com/OpenZeppelin/cairo-contracts/issues/386 x_refsource_MISC
- https://github.com/OpenZeppelin/cairo-contracts/pull/387 x_refsource_MISC
- https://github.com/OpenZeppelin/cairo-contracts/commit/2cd60279c3332285d47edf9ee3888b71257acdc9 x_refsource_MISC
- https://github.com/OpenZeppelin/cairo-contracts/blob/release-0.2.0/src/openzeppelin/account/library.cairo#L203 x_refsource_MISC
- https://github.com/OpenZeppelin/cairo-contracts/releases/tag/v0.2.1 x_refsource_MISC