CVE-2020-8819: Cardgate/woocommerce Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-5pq5-9phv-q5j3
CVSS 8.1
CWE-346
Published
Advisory Summary

CVE-2020-8819 is a HIGH (CVSS 8.1) remote code execution vulnerability (CWE-346: Origin Validation Error) affecting Cardgate/woocommerce libraries in the Packagist ecosystem. The issue involves cardgate payments plugin for woocommerce does not validate request origin. Remediation is available by upgrading affected packages to version 3.1.16.

CVE-2020-8819 at a Glance

CVE Identifier CVE-2020-8819
GHSA Identifier GHSA-5pq5-9phv-q5j3
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-346: Origin Validation Error
Affected Product Cardgate/woocommerce
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-8819

To remediate this vulnerability, upgrade all affected Cardgate/woocommerce 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/woocommerce fixed: 3.1.16
Upgrade cardgate/woocommerce to 3.1.16
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/woocommerce

How to Check if You Are Affected

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

inspect dependencies for cardgate/woocommerce

Analyze the terminal output to locate any version of Cardgate/woocommerce in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.16), 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/woocommerce, 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 3.1.15 for WooCommerce. Lack of origin authentication in the IPN callback processing function in cardgate/cardgate.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-8819 Affected Cardgate/woocommerce Versions

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

References

Frequently Asked Questions

What is CVE-2020-8819?
CVE-2020-8819 is a security vulnerability in Cardgate/woocommerce involving CardGate Payments plugin for WooCommerce does not validate request origin under CWE-346: Origin Validation Error.
Which Cardgate/woocommerce versions are affected?
Affected versions include releases prior to 3.1.16 across affected packages: cardgate/woocommerce.
What version fixes CVE-2020-8819?
Upgrading to 3.1.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cardgate/woocommerce affected?
Yes, cardgate/woocommerce is affected in releases prior to 3.1.16. Upgrade your dependency to 3.1.16 or later.
What is the CVSS score of CVE-2020-8819?
CVE-2020-8819 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-8819?
CVE-2020-8819 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-8819?
Run the dependency tree command: 'inspect dependencies for cardgate/woocommerce'. 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-5pq5-9phv-q5j3",
  "modified" : "2023-07-12T21:14:54Z",
  "published" : "2022-05-24T17:09:38Z",
  "aliases" : [ "CVE-2020-8819" ],
  "summary" : "CardGate Payments plugin for WooCommerce does not validate request origin",
  "details" : "An issue was discovered in the CardGate Payments plugin through 3.1.15 for WooCommerce. Lack of origin authentication in the IPN callback processing function in cardgate/cardgate.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/woocommerce"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.1.16"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.1.15"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8819"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cardgate/woocommerce/issues/18"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cardgate/woocommerce/pull/17/commits/0b83588d604c8c56c7fded43144fcced96b2ada9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cardgate/woocommerce"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cardgate/woocommerce/blob/f2111af7b1a3fd701c1c5916137f3ac09482feeb/cardgate/cardgate.php#L426-L442"
  }, {
    "type" : "WEB",
    "url" : "https://wpvulndb.com/vulnerabilities/10097"
  }, {
    "type" : "WEB",
    "url" : "https://www.exploit-db.com/exploits/48134"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/156504/WordPress-WooCommerce-CardGate-Payment-Gateway-3.1.15-Bypass.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-346" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-12T21:14:54Z",
    "nvd_published_at" : "2020-02-25T02:15:00Z"
  }
}