PyPA Advisory Database
PYSEC-2026-1605
Marshmallow has DoS in Schema.load(many)
Details
Impact
Schema.load(data, many=True) is vulnerable to denial of service attacks. A moderately sized request can consume a disproportionate amount of CPU time.
Patches
4.1.2, 3.26.2
Workarounds
# Fail fast
def load_many(schema, data, **kwargs):
if not isinstance(data, list):
raise ValidationError(['Invalid input type.'])
return [schema.load(item, **kwargs) for item in data]
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| PyPI | marshmallow | From 3.0.0rc1 before 3.26.2 (fixed in 3.26.2) From 4.0.0 before 4.1.2 (fixed in 4.1.2) |
References
- https://github.com/marshmallow-code/marshmallow/security/advisories/GHSA-428g-f7cq-pgp5
- https://nvd.nist.gov/vuln/detail/CVE-2025-68480
- https://github.com/marshmallow-code/marshmallow/commit/d24a0c9df061c4daa92f71cf85aca25b83eee508
- https://github.com/marshmallow-code/marshmallow
- https://pypi.org/project/marshmallow
- https://github.com/advisories/GHSA-428g-f7cq-pgp5