CVE-2022-31153
JSON

6.5medium

OpenZeppelin Contracts for Cairo account cannot process transactions on Goerli

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.46% (higher than 74% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8mjr-jr5h-q2xrPYSEC-2026-890

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

Product or packageVersionsReported by
OpenZeppelin cairo-contracts= 0.2.0CVE List
openzeppelin-cairo-contracts (PyPI)before 0.2.1GitHub Advisory Database, PyPA Advisory Database
openzeppelin contracts0.2.0NVD

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
PyPA Advisory Database6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-664CWE-863

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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:

NVD (es)

OpenZeppelin Contracts for Cairo es una biblioteca para el desarrollo de contratos escrita en Cairo para StarkNet, un ZK Rollup descentralizado. La versión 0.2.0 es vulnerable a un error que hace que los contratos de cuentas sean inusables en las redes vivas. Este problema afecta a todas las cuentas (sabores vanilla y ethereum) en la versión v0.2.0 de OpenZeppelin Contracts for Cairo, que no están en la lista blanca de la red principal de StarkNet. Sólo están afectadas las implementaciones goerli de las cuentas de la versión v0.2.0. Este comportamiento fallido no es observado en el marco de pruebas de StarkNet. Este bug ha sido parcheado en versión v0.2.1

References

https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-8mjr-jr5h-q2xrthird-party-advisory, web
https://github.com/OpenZeppelin/cairo-contracts/issues/386exploit, issue-tracking, third-party-advisory, web
https://github.com/OpenZeppelin/cairo-contracts/pull/387patch, third-party-advisory, web
https://github.com/OpenZeppelin/cairo-contracts/commit/2cd60279c3332285d47edf9ee3888b71257acdc9patch, third-party-advisory, web
https://github.com/OpenZeppelin/cairo-contracts/blob/release-0.2.0/src/openzeppelin/account/library.cairo#L203exploit, third-party-advisory, web
https://github.com/OpenZeppelin/cairo-contracts/releases/tag/v0.2.1release-notes, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2022-31153advisory
https://github.com/OpenZeppelin/cairo-contractspackage
https://github.com/pypa/advisory-database/tree/main/vulns/openzeppelin-cairo-contracts-test/PYSEC-2022-43143.yamlweb
https://pypi.org/project/openzeppelin-cairo-contractspackage
https://github.com/advisories/GHSA-8mjr-jr5h-q2xradvisory

Sources

SourceRecordLicence
CVE ListCVE-2022-31153 changed 2025-04-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-8mjr-jr5h-q2xr changed 2026-07-07CC-BY-4.0
NVDCVE-2022-31153 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-890 changed 2026-07-07CC-BY-4.0