CVE-2020-4043: Phpmussel/phpmussel Phar Unserialization Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-qr95-4mq5-r3fh
CVSS 7.7
CWE-502
Published
Advisory Summary

CVE-2020-4043 is a HIGH (CVSS 7.7) phar unserialization vulnerability vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Phpmussel/phpmussel libraries in the Packagist ecosystem. The issue involves phar unserialization vulnerability in phpmussel. Remediation is available by upgrading affected packages to version 1.6.0.

CVE-2020-4043 at a Glance

CVE Identifier CVE-2020-4043
GHSA Identifier GHSA-qr95-4mq5-r3fh
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Phpmussel/phpmussel
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.7

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

How to Fix CVE-2020-4043

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

phpmussel/phpmussel fixed: 1.6.0
Upgrade phpmussel/phpmussel to 1.6.0
maikuolan/phpmussel fixed: 1.6.0
Upgrade maikuolan/phpmussel to 1.6.0
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 phpmussel/phpmussel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-4043, inspect your project dependencies for Phpmussel/phpmussel:

inspect dependencies for phpmussel/phpmussel

Analyze the terminal output to locate any version of Phpmussel/phpmussel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.0), 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Phpmussel/phpmussel, 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 _What kind of vulnerability is it? Who is impacted?_ Anyone using >= v1.0.0 < v1.6.0. ### Patches _Has the problem been patched? What versions should users upgrade to?_ Yes. Upgrading to at least >= v1.6.0 (the earliest safe version) will resolve the problem. However, as multiple new major versions have been released since that version, upgrading to the latest available version is recommended, in order to protect against any potential future vulnerabilities, unknown at the time of writing this advisory. ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ Yes. In the package's configuration, disable archive checking by setting `check_archives` to `false` (thus avoiding execution of the affected parts of the codebase entirely). ### References _Are there any links users can visit to find out more?_ Yes. The vulnerability is documented at [SECURITY.md](https://github.com/phpMussel/phpMussel/security/policy) and also at [#167](https://github.com/phpMussel/phpMussel/issues/167). ### For more information If you have any questions or comments about this advisory: * Comment at the issue linked to this advisory, or.. * Contact [the package author](https://github.com/Maikuolan).

CVE-2020-4043 Affected Phpmussel/phpmussel Versions

2 component(s)
Fixed Versions:
1.6.0
Product / Package Ecosystem Affected Versions Fixed Version
phpmussel/phpmussel
Packagist
≥ 1.0.0
< 1.6.0
1.6.0
maikuolan/phpmussel
Packagist
≥ 1.0.0
< 1.6.0
1.6.0

References

Frequently Asked Questions

What is CVE-2020-4043?
CVE-2020-4043 is a security vulnerability in Phpmussel/phpmussel involving Phar unserialization vulnerability in phpMussel under CWE-502: Deserialization of Untrusted Data.
Which Phpmussel/phpmussel versions are affected?
Affected versions include releases prior to 1.6.0 across affected packages: phpmussel/phpmussel, maikuolan/phpmussel.
What version fixes CVE-2020-4043?
Upgrading to 1.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is phpmussel/phpmussel affected?
Yes, phpmussel/phpmussel is affected in releases prior to 1.6.0. Upgrade your dependency to 1.6.0 or later.
Is maikuolan/phpmussel affected?
Yes, maikuolan/phpmussel is affected in releases prior to 1.6.0. Upgrade your dependency to 1.6.0 or later.
What is the CVSS score of CVE-2020-4043?
CVE-2020-4043 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2020-4043?
CVE-2020-4043 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Packagist dependencies for CVE-2020-4043?
Run the dependency tree command: 'inspect dependencies for phpmussel/phpmussel'. 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-qr95-4mq5-r3fh",
  "modified" : "2022-10-11T18:27:10Z",
  "published" : "2020-06-10T19:40:30Z",
  "aliases" : [ "CVE-2020-4043" ],
  "summary" : "Phar unserialization vulnerability in phpMussel",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nAnyone using >= v1.0.0 < v1.6.0.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nYes. Upgrading to at least >= v1.6.0 (the earliest safe version) will resolve the problem. However, as multiple new major versions have been released since that version, upgrading to the latest available version is recommended, in order to protect against any potential future vulnerabilities, unknown at the time of writing this advisory.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nYes. In the package's configuration, disable archive checking by setting `check_archives` to `false` (thus avoiding execution of the affected parts of the codebase entirely).\n\n### References\n_Are there any links users can visit to find out more?_\n\nYes. The vulnerability is documented at [SECURITY.md](https://github.com/phpMussel/phpMussel/security/policy) and also at [#167](https://github.com/phpMussel/phpMussel/issues/167).\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Comment at the issue linked to this advisory, or..\n* Contact [the package author](https://github.com/Maikuolan).\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpmussel/phpmussel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.6.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "maikuolan/phpmussel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.6.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/phpMussel/phpMussel/security/advisories/GHSA-qr95-4mq5-r3fh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-4043"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phpMussel/phpMussel/issues/167"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phpMussel/phpMussel/pull/173"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phpMussel/phpMussel/commit/97f25973433921c1f953430f32d3081adc4851a4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/phpMussel/phpMussel"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phpMussel/phpMussel/security/policy#currently-known-vulnerabilities"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-10T19:39:58Z",
    "nvd_published_at" : null
  }
}