Denial of Service Vulnerability in Marshmallow Package

marshmallow Updated 22 Dec 2025

Summary

22/12/2025
MODERATE
Yes i
Moderate
5.3

GHSA-428g-f7cq-pgp5: Marshmallow has DoS in Schema.load(many). Affects marshmallow across 2 version ranges.

>= 3.0.0rc1, < 3.26.2 >= 4.0.0, < 4.1.2

Fixed in 3.26.2 or 4.1.2, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Marshmallow is a popular Python library used for object serialization and deserialization, allowing developers to convert complex data types, such as objects, into JSON and vice versa. It provides features like data validation and schema definition, making it a valuable tool for API development. However, a recent vulnerability has been identified in the Schema.load method when processing multiple inputs, which can lead to significant performance issues.

Vulnerability Detail

The vulnerability arises from the Schema.load(data, many=True) method, which is susceptible to denial of service (DoS) attacks. When a moderately sized request is processed, it can consume an excessive amount of CPU resources, potentially leading to application slowdowns or crashes. This issue is classified under CWE-405, which pertains to the 'Concurrent Execution using Shared Resource with Improper Synchronization.' The vulnerability affects versions of Marshmallow starting from 3.0.0rc1 up to 3.26.1 and 4.0.0 up to 4.1.1.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 3.0.0rc1, < 3.26.2 3.26.2
    pip install --upgrade "marshmallow==3.26.2"
  • >= 4.0.0, < 4.1.2 4.1.2
    pip install --upgrade "marshmallow==4.1.2"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary measure, you can implement the following code to fail fast when invalid input types are detected:

# 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]

Conclusion

The identified denial of service vulnerability in the Marshmallow package poses a risk to applications that rely on the Schema.load method for processing multiple inputs. It is crucial for developers to update to the latest patched versions or implement the suggested workaround to mitigate the risk.

See every vulnerability recorded for marshmallow →

Share this vulnerability

FAQ

The vulnerability is a denial of service (DoS) issue that can cause excessive CPU usage when processing multiple inputs in the Schema.load method.

Versions of Marshmallow from 3.0.0rc1 to 3.26.1 and from 4.0.0 to 4.1.1 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of this vulnerability is 5.3, indicating a moderate severity level.

If you cannot update the package immediately, consider implementing the provided workaround to validate input types and prevent potential DoS attacks.

Related vulnerabilities

Recent vulnerabilities recorded for marshmallow.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 3.0.0rc1, < 3.26.2 3.26.2
    pip install --upgrade "marshmallow==3.26.2"
  • >= 4.0.0, < 4.1.2 4.1.2
    pip install --upgrade "marshmallow==4.1.2"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback