CVE-2022-31153 OpenZeppelin Contracts for Cairo account cannot process transactions on Goerli

Medium 6.5 Published Updated

A logic error in OpenZeppelin Cairo contracts prevents account transactions on Goerli, causing denial of service for users.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-31153?

CVE-2022-31153 is a medium-severity vulnerability in OpenZeppelin cairo-contracts, published on 15 Jul 2022. Any signed-in user can exploit it over the network, with no action from the victim.

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.

Weakness: CWE-863, CWE-664

Which versions are affected by CVE-2022-31153?

3 open source packages ship an affected version, including openzeppelin-cairo-contracts. It affects 1 product.

PackageAffectedFixed in
openzeppelin-cairo-contracts PyPIAll versions0.2.1
openzeppelin-cairo-contracts PyPIAll versions0.2.1
openzeppelin-cairo-contracts PyPIAll versions0.2.1

Products include Openzeppelin Contracts.

How do I fix CVE-2022-31153?

Upgrade openzeppelin-cairo-contracts to 0.2.1 or later.

Is CVE-2022-31153 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31153 exists.

Sources

Also known as GHSA-8mjr-jr5h-q2xr, PYSEC-2026-890.

Is CVE-2022-31153 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free