CVE-2018-17175: Marshmallow Security Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-9q2p-fj49-vpxj
CVSS 5.3
CWE-358
Published
Advisory Summary

CVE-2018-17175 is a MODERATE (CVSS 5.3) security vulnerability vulnerability (CWE-358: Improperly Implemented Security Check for Standard) affecting Marshmallow libraries in the PyPI ecosystem. The issue involves in marshmallow library the schema "only" option treats an empty list as implying no "only" option. Remediation is available by upgrading affected packages to version 2.15.1, 3.0.0b9.

CVE-2018-17175 at a Glance

CVE Identifier CVE-2018-17175
GHSA Identifier GHSA-9q2p-fj49-vpxj
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-358: Improperly Implemented Security Check for Standard
Affected Product Marshmallow
Package Ecosystem PyPI
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:L/I:N/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 Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2018-17175

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

marshmallow fixed: 2.15.1
pip install marshmallow>=2.15.1
marshmallow fixed: 3.0.0b9
pip install marshmallow>=3.0.0b9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show marshmallow

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2018-17175, inspect your installed packages using pip:

pip show marshmallow

Analyze the terminal output to locate any version of Marshmallow in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.15.1), your application is affected.

Note: The pip show marshmallow command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-358: Improperly Implemented Security Check for Standard, where the product does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique. In Marshmallow, 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

In the marshmallow library before 2.15.1 and 3.x before 3.0.0b9 for Python, the schema "only" option treats an empty list as implying no "only" option, which allows a request that was intended to expose no fields to instead expose all fields (if the schema is being filtered dynamically using the "only" option, and there is a user role that produces an empty value for "only").

CVE-2018-17175 Affected Marshmallow Versions

2 component(s)
Fixed Versions:
2.15.13.0.0b9
Product / Package Ecosystem Affected Versions Fixed Version
marshmallow
PyPI
< 2.15.1
2.15.1
marshmallow
PyPI
≥ 3.0a0
< 3.0.0b9
3.0.0b9

References

Frequently Asked Questions

What is CVE-2018-17175?
CVE-2018-17175 is a security vulnerability in Marshmallow involving In marshmallow library the schema "only" option treats an empty list as implying no "only" option under CWE-358: Improperly Implemented Security Check for Standard.
Which Marshmallow versions are affected?
Affected versions include releases prior to 2.15.1, 3.0.0b9 across affected packages: marshmallow.
What version fixes CVE-2018-17175?
Upgrading to 2.15.1, 3.0.0b9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is marshmallow affected?
Yes, marshmallow is affected in releases prior to 2.15.1, 3.0.0b9. Upgrade your dependency to 2.15.1, 3.0.0b9 or later.
What is the CVSS score of CVE-2018-17175?
CVE-2018-17175 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:L/I:N/A:N.
What CWE is associated with CVE-2018-17175?
CVE-2018-17175 is classified under CWE-358: Improperly Implemented Security Check for Standard (The product does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.).
How can I check PyPI dependencies for CVE-2018-17175?
Run the dependency tree command: 'pip show marshmallow'. 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-9q2p-fj49-vpxj",
  "modified" : "2024-09-24T20:09:28Z",
  "published" : "2018-10-10T16:10:46Z",
  "aliases" : [ "CVE-2018-17175" ],
  "summary" : "In marshmallow library the schema \"only\" option treats an empty list as implying no \"only\" option",
  "details" : "In the marshmallow library before 2.15.1 and 3.x before 3.0.0b9 for Python, the schema \"only\" option treats an empty list as implying no \"only\" option, which allows a request that was intended to expose no fields to instead expose all fields (if the schema is being filtered dynamically using the \"only\" option, and there is a user role that produces an empty value for \"only\").",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "marshmallow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.15.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "marshmallow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0a0"
      }, {
        "fixed" : "3.0.0b9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-17175"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/marshmallow-code/marshmallow/issues/772"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/marshmallow-code/marshmallow/pull/777"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/marshmallow-code/marshmallow/pull/782"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/marshmallow-code"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/marshmallow/PYSEC-2018-67.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-358" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:29:19Z",
    "nvd_published_at" : null
  }
}