CVE-2020-7385: Metasploit framework Metasploit Framework User Exposes Metasploit Vulnerability

HIGH
Advisory Identifier: GHSA-xgww-h98f-24qf
CVSS 8.1
CWE-502
Published
Advisory Summary

CVE-2020-7385 is a HIGH (CVSS 8.1) metasploit framework user exposes metasploit vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Metasploit framework libraries in the RubyGems ecosystem. The issue involves metasploit framework user exposes metasploit to same deserialization issue that is exploited by that module. Remediation is available by upgrading affected packages to version 4.19.0.

CVE-2020-7385 at a Glance

CVE Identifier CVE-2020-7385
GHSA Identifier GHSA-xgww-h98f-24qf
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Metasploit framework
Package Ecosystem RubyGems
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:N/UI:R/S:U/C:H/I:H/A:N).

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

How to Fix CVE-2020-7385

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

metasploit-framework fixed: 4.19.0
Upgrade metasploit-framework to 4.19.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 metasploit-framework

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-7385, inspect your project dependencies for Metasploit framework:

inspect dependencies for metasploit-framework

Analyze the terminal output to locate any version of Metasploit framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.19.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 Metasploit framework, 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

By launching the drb_remote_codeexec exploit, a Metasploit Framework user will inadvertently expose Metasploit to the same deserialization issue that is exploited by that module, due to the reliance on the vulnerable Distributed Ruby class functions. Since Metasploit Framework typically runs with elevated privileges, this can lead to a system compromise on the Metasploit workstation. Note that an attacker would have to lie in wait and entice the Metasploit user to run the affected module against a malicious endpoint in a "hack-back" type of attack. Metasploit is only vulnerable when the drb_remote_codeexec module is running. In most cases, this cannot happen automatically.

CVE-2020-7385 Affected Metasploit framework Versions

1 component(s)
Fixed Versions:
4.19.0
Product / Package Ecosystem Affected Versions Fixed Version
metasploit-framework
RubyGems
< 4.19.0
4.19.0

References

Frequently Asked Questions

What is CVE-2020-7385?
CVE-2020-7385 is a security vulnerability in Metasploit framework involving Metasploit Framework user exposes Metasploit to same deserialization issue that is exploited by that module under CWE-502: Deserialization of Untrusted Data.
Which Metasploit framework versions are affected?
Affected versions include releases prior to 4.19.0 across affected packages: metasploit-framework.
What version fixes CVE-2020-7385?
Upgrading to 4.19.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is metasploit-framework affected?
Yes, metasploit-framework is affected in releases prior to 4.19.0. Upgrade your dependency to 4.19.0 or later.
What is the CVSS score of CVE-2020-7385?
CVE-2020-7385 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2020-7385?
CVE-2020-7385 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 RubyGems dependencies for CVE-2020-7385?
Run the dependency tree command: 'inspect dependencies for metasploit-framework'. 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-xgww-h98f-24qf",
  "modified" : "2023-05-05T02:25:19Z",
  "published" : "2022-05-24T17:48:42Z",
  "aliases" : [ "CVE-2020-7385" ],
  "summary" : "Metasploit Framework user exposes Metasploit to same deserialization issue that is exploited by that module",
  "details" : "By launching the drb_remote_codeexec exploit, a Metasploit Framework user will inadvertently expose Metasploit to the same deserialization issue that is exploited by that module, due to the reliance on the vulnerable Distributed Ruby class functions. Since Metasploit Framework typically runs with elevated privileges, this can lead to a system compromise on the Metasploit workstation. Note that an attacker would have to lie in wait and entice the Metasploit user to run the affected module against a malicious endpoint in a \"hack-back\" type of attack. Metasploit is only vulnerable when the drb_remote_codeexec module is running. In most cases, this cannot happen automatically.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "metasploit-framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.19.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-7385"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rapid7/metasploit-framework/pull/14300"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rapid7/metasploit-framework/pull/14335"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rapid7/metasploit-framework"
  }, {
    "type" : "WEB",
    "url" : "https://help.rapid7.com/metasploit/release-notes/archive/2020/10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-05T02:25:19Z",
    "nvd_published_at" : "2021-04-23T16:15:00Z"
  }
}