CVE-2022-36008: Fc rpc Incorrect Parsing Of EVM Reversion Vulnerability

MODERATE
Advisory Identifier: GHSA-mjvm-mhgc-q4gp
CVSS 6.5
CWE-190
Published
Advisory Summary

CVE-2022-36008 is a MODERATE (CVSS 6.5) incorrect parsing of evm reversion vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Fc rpc libraries in the crates.io ecosystem. The issue involves incorrect parsing of evm reversion exit reason in rpc. Remediation is available in the latest vendor maintenance releases.

CVE-2022-36008 at a Glance

CVE Identifier CVE-2022-36008
GHSA Identifier GHSA-mjvm-mhgc-q4gp
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-190: Integer Overflow or Wraparound
Affected Product Fc rpc
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2022-36008

To remediate this vulnerability, upgrade all affected Fc rpc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

fc-rpc fixed: Latest secure release
Upgrade fc-rpc to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for fc-rpc

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-36008, inspect your project dependencies for Fc rpc:

inspect dependencies for fc-rpc

Analyze the terminal output to locate any version of Fc rpc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In Fc rpc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact A low severity security issue was discovered affecting parsing of the RPC result of the exit reason in case of EVM reversion. In release build, this would cause the exit reason being incorrectly parsed and returned by RPC. In debug build, this would cause an overflow panic. No action is needed unless you have a bridge node that needs to distinguish different reversion exit reasons and you used RPC for this. ### Patches The issue is patched in https://github.com/paritytech/frontier/pull/820 ### Workarounds None. ### References PR https://github.com/paritytech/frontier/pull/820 ### For more information If you have any questions or comments about this advisory: * Email [Wei Tang](mailto:wei@that.world)

CVE-2022-36008 Affected Fc rpc Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
fc-rpc
crates.io
≤ 1.0.0

References

Frequently Asked Questions

What is CVE-2022-36008?
CVE-2022-36008 is a security vulnerability in Fc rpc involving Incorrect parsing of EVM reversion exit reason in RPC under CWE-190: Integer Overflow or Wraparound.
Which Fc rpc versions are affected?
Affected versions include releases prior to current release patches across affected packages: fc-rpc.
What version fixes CVE-2022-36008?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is fc-rpc affected?
Yes, fc-rpc is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2022-36008?
CVE-2022-36008 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2022-36008?
CVE-2022-36008 is classified under CWE-190: Integer Overflow or Wraparound (The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.).
How can I check crates.io dependencies for CVE-2022-36008?
Run the dependency tree command: 'inspect dependencies for fc-rpc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mjvm-mhgc-q4gp",
  "modified" : "2024-10-24T21:48:34Z",
  "published" : "2022-08-18T19:18:25Z",
  "aliases" : [ "CVE-2022-36008" ],
  "summary" : "Incorrect parsing of EVM reversion exit reason in RPC",
  "details" : "### Impact\n\nA low severity security issue was discovered affecting parsing of the RPC result of the exit reason in case of EVM reversion. In release build, this would cause the exit reason being incorrectly parsed and returned by RPC. In debug build, this would cause an overflow panic.\n\nNo action is needed unless you have a bridge node that needs to distinguish different reversion exit reasons and you used RPC for this.\n\n### Patches\n\nThe issue is patched in https://github.com/paritytech/frontier/pull/820\n\n### Workarounds\n\nNone.\n\n### References\n\nPR https://github.com/paritytech/frontier/pull/820\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Email [Wei Tang](mailto:wei@that.world)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "fc-rpc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/paritytech/frontier/security/advisories/GHSA-mjvm-mhgc-q4gp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-36008"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/paritytech/frontier/pull/820"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/paritytech/frontier/commit/fff8cc43b7756ce3979a38fc473f38e6e24ac451"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/paritytech/frontier"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-190" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-08-18T19:18:25Z",
    "nvd_published_at" : "2022-08-19T21:15:00Z"
  }
}