{"url":"http://public2.vulnerablecode.io/api/packages/87415?format=json","purl":"pkg:golang/github.com/crypto-org-chain/cronos@0.7.1-rc2","type":"golang","namespace":"github.com/crypto-org-chain","name":"cronos","version":"0.7.1-rc2","qualifiers":{},"subpath":"","is_vulnerable":false,"next_non_vulnerable_version":"0.6.5","latest_non_vulnerable_version":"0.8.0","affected_by_vulnerabilities":[],"fixing_vulnerabilities":[{"url":"http://public2.vulnerablecode.io/api/vulnerabilities/51008?format=json","vulnerability_id":"VCID-udsk-4bzt-ufer","summary":"Ethermint vulnerable to DoS through unintended Contract Selfdestruct\n# Vulnerability Report\n\n## Impact\n\nSmart contract applications that make use of the `selfdestruct` functionality and their end-users.\n\n## Classification\n\nThe vulnerability has been classified as `high` with a CVSS score of `8.2`. It has the potential to create a denial-of-service to all contracts that can invoke the [`selfdestruct`](https://ethereum.stackexchange.com/questions/315/why-are-selfdestructs-used-in-contract-programming#347) function to destroy a smart contract. \n\n## Users Impacted\n\nDue to the successfully coordinated security vulnerability disclosure, no smart contracts were impacted through the use of this vulnerability. Smart contract states and storage values are not affected by this vulnerability. User funds and balances are safe.\n\n## Disclosure\n\nIn Ethermint running versions before `v0.17.2`, the contract `selfdestruct` invocation permanently removes the corresponding bytecode from the internal database storage. However, due to a bug in the [`DeleteAccount`](https://github.com/evmos/ethermint/blob/c9d42d667b753147977a725e98ed116c933c76cb/x/evm/keeper/statedb.go#L199-L203) function, all contracts that used the identical bytecode (i.e shared the same `CodeHash`) will also stop working once one contract invokes `selfdestruct`, even though the other contracts did not invoke the `selfdestruct` OPCODE.\n\n### Additional Details\n\nThe same contract bytecode can be deployed multiple times to create multiple contract instances. In the internal database, the bytecode is stored as a key-value entry `bytecode hash --> bytecode` which is shared by those contracts. Unfortunately, when one of the contracts invokes `selfdestruct`, it will remove the corresponding `bytecode hash -> bytecode` entry, and thus it disables all the contracts that share the same bytecode.\n\nThe attack scenario is as follows:\n\n1. The malicious attacker identifies a vulnerable contract that can invoke `selfdestruct`\n2. The attacker deploys a copy of the contract with identical bytecode\n3. Finally, the attacker triggers the `selfdestruct` operation on their redeployed contract, actively causing a DoS on the original and vulnerable contract. All transactions will fail until a workaround is used (see below).\n\n## Patches\n\n*Has the problem been patched? What versions should users upgrade to?*\n\nThis vulnerability has been patched in Ethermint versions ≥[v0.18.0](https://github.com/evmos/ethermint/releases/tag/v0.18.0). The patch has state machine-breaking changes for applications using Ethermint so a coordinated upgrade procedure is required.\n\n#### Details\n\nThe patch removes the bytecode deletion logic, i.e. contract bytecodes are never deleted from the internal database after the patch.\nAt the moment, Ethermint does not track how many times each bytecode is used, and thus it cannot determine if it is safe to delete a particular bytecode on `selfdestruct` invocations. This behavior is the same with go-ethereum.\n\n## Workarounds\n\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nIf a contract is subject to DoS due to this issue, the user can redeploy the same contract, _i.e_ with identical bytecode, so that the original contract's code is recovered.\n\nThe new contract deployment restores the `bytecode hash -> bytecode` entry in the internal state.\n\n## References\n\n*Are there any links users can visit to find out more?*\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Reach out to the Core Team in [Discord](https://discord.gg/evmos)\n* Open a discussion in [evmos/ethermint](https://github.com/evmos/ethermint/discussions)\n* Email us at [security@evmos.org](mailto:security@evmos.org) for security questions\n* For Press, email us at [evmos@west-comms.com](mailto:evmos@west-comms.com).\n\n### Credits\n\nThanks to the \n\n- Cronos Team: @yihuang and @tomtau for discovering the issue, @gakuzen-crypto, @polycryptics, @FinnZhangCrypto, @wilson-ang, @brianatcrypto for the impact analysis.\n- Evmos Team: @facs95 for patching the issue and @fedekunze for managing the release and coordinating between teams.","references":[{"reference_url":"https://api.first.org/data/v1/epss?cve=CVE-2022-35936","reference_id":"","reference_type":"","scores":[{"value":"0.00149","scoring_system":"epss","scoring_elements":"0.35144","published_at":"2026-05-29T12:55:00Z"}],"url":"https://api.first.org/data/v1/epss?cve=CVE-2022-35936"},{"reference_url":"https://github.com/evmos/ethermint","reference_id":"","reference_type":"","scores":[{"value":"8.2","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/evmos/ethermint"},{"reference_url":"https://github.com/evmos/ethermint/blob/c9d42d667b753147977a725e98ed116c933c76cb/x/evm/keeper/statedb.go#L199-L203","reference_id":"","reference_type":"","scores":[{"value":"8.2","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""},{"value":"Track","scoring_system":"ssvc","scoring_elements":"SSVCv2/E:P/A:Y/T:P/P:M/B:A/M:M/D:T/2025-04-22T15:39:54Z/"}],"url":"https://github.com/evmos/ethermint/blob/c9d42d667b753147977a725e98ed116c933c76cb/x/evm/keeper/statedb.go#L199-L203"},{"reference_url":"https://github.com/evmos/ethermint/commit/144741832007a26dbe950512acbda4ed95b2a451","reference_id":"","reference_type":"","scores":[{"value":"8.2","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""},{"value":"Track","scoring_system":"ssvc","scoring_elements":"SSVCv2/E:P/A:Y/T:P/P:M/B:A/M:M/D:T/2025-04-22T15:39:54Z/"}],"url":"https://github.com/evmos/ethermint/commit/144741832007a26dbe950512acbda4ed95b2a451"},{"reference_url":"https://github.com/evmos/ethermint/security/advisories/GHSA-f92v-grc2-w2fg","reference_id":"","reference_type":"","scores":[{"value":"8.2","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""},{"value":"Track","scoring_system":"ssvc","scoring_elements":"SSVCv2/E:P/A:Y/T:P/P:M/B:A/M:M/D:T/2025-04-22T15:39:54Z/"}],"url":"https://github.com/evmos/ethermint/security/advisories/GHSA-f92v-grc2-w2fg"},{"reference_url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35936","reference_id":"","reference_type":"","scores":[{"value":"8.2","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35936"}],"fixed_packages":[{"url":"http://public2.vulnerablecode.io/api/packages/87415?format=json","purl":"pkg:golang/github.com/crypto-org-chain/cronos@0.7.1-rc2","is_vulnerable":false,"affected_by_vulnerabilities":[],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:golang/github.com/crypto-org-chain/cronos@0.7.1-rc2"}],"aliases":["CVE-2022-35936","GHSA-f92v-grc2-w2fg"],"risk_score":null,"exploitability":null,"weighted_severity":null,"resource_url":"http://public2.vulnerablecode.io/vulnerabilities/VCID-udsk-4bzt-ufer"}],"risk_score":null,"resource_url":"http://public2.vulnerablecode.io/packages/pkg:golang/github.com/crypto-org-chain/cronos@0.7.1-rc2"}