CVE-2021-41138: Pallet ethereum Validity Check Missing Vulnerability

MODERATE
Advisory Identifier: GHSA-vj62-g63v-f8mf
CVSS 5.3
CWE-20
Published
Advisory Summary

CVE-2021-41138 is a MODERATE (CVSS 5.3) validity check missing vulnerability (CWE-20: Improper Input Validation) affecting Pallet ethereum libraries in the crates.io ecosystem. The issue involves validity check missing in frontier. Remediation is available in the latest vendor maintenance releases.

CVE-2021-41138 at a Glance

CVE Identifier CVE-2021-41138
GHSA Identifier GHSA-vj62-g63v-f8mf
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-20: Improper Input Validation
Affected Product Pallet ethereum
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix CVE-2021-41138

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

pallet-ethereum fixed: Latest secure release
Upgrade pallet-ethereum 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 pallet-ethereum

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-41138, inspect your project dependencies for Pallet ethereum:

inspect dependencies for pallet-ethereum

Analyze the terminal output to locate any version of Pallet ethereum 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Pallet ethereum, 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 In the newly introduced signed Frontier-specific extrinsic for `pallet-ethereum`, a large part of transaction validation logic was only called in transaction pool validation, but not in block execution. Malicious validators can take advantage of this to put invalid transactions into a block. The attack is limited in that the signature is always validated, and the majority of the validation is done again in the subsequent `pallet-evm` execution logic. However, do note that a chain ID replay attack was possible. In addition, spamming attacks are of main concerns, while they are limited by Substrate block size limits and other factors. ### Patches The issue is patched in commit 146bb48849e5393004be5c88beefe76fdf009aba. ### References Patch PR: https://github.com/paritytech/frontier/pull/495 ### For more information If you have any questions or comments about this advisory: * Open an issue in [Frontier repo](https://github.com/paritytech/frontier/issues) ### Special thanks Special thanks to @librelois, @nanocryk and the Moonbeam team for reporting and fixing this security vulnerability.

CVE-2021-41138 Affected Pallet ethereum Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
pallet-ethereum
crates.io
≤ 3.0.0

References

Frequently Asked Questions

What is CVE-2021-41138?
CVE-2021-41138 is a security vulnerability in Pallet ethereum involving Validity check missing in Frontier under CWE-20: Improper Input Validation.
Which Pallet ethereum versions are affected?
Affected versions include releases prior to current release patches across affected packages: pallet-ethereum.
What version fixes CVE-2021-41138?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is pallet-ethereum affected?
Yes, pallet-ethereum 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-2021-41138?
CVE-2021-41138 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2021-41138?
CVE-2021-41138 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check crates.io dependencies for CVE-2021-41138?
Run the dependency tree command: 'inspect dependencies for pallet-ethereum'. 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-vj62-g63v-f8mf",
  "modified" : "2024-10-24T21:53:15Z",
  "published" : "2021-10-13T18:53:38Z",
  "aliases" : [ "CVE-2021-41138" ],
  "summary" : "Validity check missing in Frontier",
  "details" : "### Impact\n\nIn the newly introduced signed Frontier-specific extrinsic for `pallet-ethereum`, a large part of transaction validation logic was only called in transaction pool validation, but not in block execution. Malicious validators can take advantage of this to put invalid transactions into a block.\n\nThe attack is limited in that the signature is always validated, and the majority of the validation is done again in the subsequent `pallet-evm` execution logic. However, do note that a chain ID replay attack was possible. In addition, spamming attacks are of main concerns, while they are limited by Substrate block size limits and other factors.\n\n### Patches\n\nThe issue is patched in commit 146bb48849e5393004be5c88beefe76fdf009aba.\n\n### References\n\nPatch PR: https://github.com/paritytech/frontier/pull/495\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [Frontier repo](https://github.com/paritytech/frontier/issues)\n\n### Special thanks\n\nSpecial thanks to @librelois, @nanocryk and the Moonbeam team for reporting and fixing this security vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "pallet-ethereum"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/paritytech/frontier/security/advisories/GHSA-vj62-g63v-f8mf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41138"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/paritytech/frontier/pull/495"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/paritytech/frontier/pull/497"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/paritytech/frontier/commit/146bb48849e5393004be5c88beefe76fdf009aba"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/polkadot-evm/frontier"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-10-13T17:34:31Z",
    "nvd_published_at" : "2021-10-13T16:15:00Z"
  }
}