In marshmallow library the schema "only" option treats an empty list as implying no "only" option
Moderate severity
GitHub Reviewed
Published
Oct 10, 2018
to the GitHub Advisory Database
•
Updated Sep 24, 2024
Package
Affected versions
< 2.15.1
>= 3.0a0, < 3.0.0b9
Patched versions
2.15.1
3.0.0b9
Description
Published to the GitHub Advisory Database
Oct 10, 2018
Reviewed
Jun 16, 2020
Last updated
Sep 24, 2024
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").
References