# CVE-2018-17175: In marshmallow library the schema "only" option treats an empty list as implying no "only" option

> An attacker can expose all schema fields instead of none when the 'only' option is dynamically set to an empty list, leading to information disclosure.

- **Severity:** Medium 5.3 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Sep 2018
- **Updated:** 17 Sep 2024
- **Also known as:** DEBIAN-CVE-2018-17175, GHSA-9q2p-fj49-vpxj, MGASA-2019-0065, PYSEC-2018-67, UBUNTU-CVE-2018-17175, openSUSE-SU-2024:11238-1, openSUSE-SU-2024:14147-1, openSUSE-SU-2026:12017-1

## What is CVE-2018-17175?

CVE-2018-17175 is a medium-severity vulnerability in n/a, published on 18 Sep 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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").

## Which versions are affected by CVE-2018-17175?

5 open source packages ship an affected version, including marshmallow. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `marshmallow` | PyPI | All versions | 2.15.1, 3.0.0b9 |
| `marshmallow` | PyPI | All versions | 2.15.1 |
| `marshmallow` | PyPI | All versions | 2.15.1 |
| `marshmallow` | PyPI | From 3.0a0 | 3.0.0b9 |
| `marshmallow` | PyPI | From 3.0a0 | 3.0.0b9 |
| `python-marshmallow` | openSUSE:Tumbleweed | All versions | 3.20.2-2.2 |
| `python-marshmallow` | openSUSE:Tumbleweed | All versions | 4.3.0-1.2 |

Products: Marshmallow Project Marshmallow.

## How do I fix CVE-2018-17175?

Upgrade marshmallow to a fixed version for your release line: 2.15.1 or 3.0.0b9.

## Is CVE-2018-17175 being exploited?

There is no known exploitation of CVE-2018-17175 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-17175 and fix it if it is affected.

What it is: CVE-2018-17175 is a medium-severity vulnerability in n/a, published on 18 Sep 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-17175 in the wild and no public exploit code.

Affected packages and fixed versions:
- marshmallow (PyPI): affected all versions; fixed in 2.15.1, 3.0.0b9
- marshmallow (PyPI): affected all versions; fixed in 2.15.1
- marshmallow (PyPI): affected all versions; fixed in 2.15.1
- marshmallow (PyPI): affected from 3.0a0; fixed in 3.0.0b9
- marshmallow (PyPI): affected from 3.0a0; fixed in 3.0.0b9

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-17175/ (Markdown: https://insights.sbomify.com/CVE-2018-17175/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-17175
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-17175
- OSV: https://osv.dev/vulnerability/CVE-2018-17175

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-17175/
Summaries are generated and may contain mistakes; the official description above is the record.
