CVE-2020-8818: Cardgate/magento2 Origin Validation Error Vulnerability

HIGH
Advisory Identifier: GHSA-qf6q-qfwp-vp44
CVSS 8.1
CWE-346
Published
Advisory Summary

CVE-2020-8818 is a HIGH (CVSS 8.1) origin validation error vulnerability (CWE-346: Origin Validation Error) affecting Cardgate/magento2 libraries in the Packagist ecosystem. The issue involves origin validation error in magento 2. Remediation is available by upgrading affected packages to version 2.0.33.

CVE-2020-8818 at a Glance

CVE Identifier CVE-2020-8818
GHSA Identifier GHSA-qf6q-qfwp-vp44
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-346: Origin Validation Error
Affected Product Cardgate/magento2
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.1

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:H/I:H/A:N).

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 High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2020-8818

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

cardgate/magento2 fixed: 2.0.33
Upgrade cardgate/magento2 to 2.0.33
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 cardgate/magento2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-8818, inspect your project dependencies for Cardgate/magento2:

inspect dependencies for cardgate/magento2

Analyze the terminal output to locate any version of Cardgate/magento2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.33), 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-346: Origin Validation Error, where the product does not properly verify that the source of data or communication is valid. In Cardgate/magento2, 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

An issue was discovered in the CardGate Payments plugin through 2.0.30 for Magento 2. Lack of origin authentication in the IPN callback processing function in Controller/Payment/Callback.php allows an attacker to remotely replace critical plugin settings (merchant ID, secret key, etc.) and therefore bypass the payment process (e.g., spoof an order status by manually sending an IPN callback request with a valid signature but without real payment) and/or receive all of the subsequent payments.

CVE-2020-8818 Affected Cardgate/magento2 Versions

1 component(s)
Fixed Versions:
2.0.33
Product / Package Ecosystem Affected Versions Fixed Version
cardgate/magento2
Packagist
< 2.0.33
2.0.33

References

Frequently Asked Questions

What is CVE-2020-8818?
CVE-2020-8818 is a security vulnerability in Cardgate/magento2 involving Origin Validation Error in Magento 2 under CWE-346: Origin Validation Error.
Which Cardgate/magento2 versions are affected?
Affected versions include releases prior to 2.0.33 across affected packages: cardgate/magento2.
What version fixes CVE-2020-8818?
Upgrading to 2.0.33 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cardgate/magento2 affected?
Yes, cardgate/magento2 is affected in releases prior to 2.0.33. Upgrade your dependency to 2.0.33 or later.
What is the CVSS score of CVE-2020-8818?
CVE-2020-8818 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2020-8818?
CVE-2020-8818 is classified under CWE-346: Origin Validation Error (The product does not properly verify that the source of data or communication is valid.).
How can I check Packagist dependencies for CVE-2020-8818?
Run the dependency tree command: 'inspect dependencies for cardgate/magento2'. 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-qf6q-qfwp-vp44",
  "modified" : "2021-10-08T22:34:05Z",
  "published" : "2021-10-12T16:30:58Z",
  "aliases" : [ "CVE-2020-8818" ],
  "summary" : "Origin Validation Error in Magento 2",
  "details" : "An issue was discovered in the CardGate Payments plugin through 2.0.30 for Magento 2. Lack of origin authentication in the IPN callback processing function in Controller/Payment/Callback.php allows an attacker to remotely replace critical plugin settings (merchant ID, secret key, etc.) and therefore bypass the payment process (e.g., spoof an order status by manually sending an IPN callback request with a valid signature but without real payment) and/or receive all of the subsequent payments.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "cardgate/magento2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.33"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8818"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cardgate/magento2/issues/54"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cardgate/magento2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cardgate/magento2/blob/715979e54e1a335d78a8c5586f9e9987c3bf94fd/Controller/Payment/Callback.php#L88-L107"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cardgate/magento2/releases/tag/v2.0.33"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/156505/Magento-WooCommerce-CardGate-Payment-Gateway-2.0.30-Bypass.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-346" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-10-08T22:34:05Z",
    "nvd_published_at" : "2020-02-25T02:15:00Z"
  }
}