-
Notifications
You must be signed in to change notification settings - Fork 174
Description
Checklist
- I agree to the terms within the Safety Code of Conduct.
- I have searched existing issues to ensure this bug hasn't been reported before.
Safety version
Summary
safety==3.7.0 (released Nov 6, 2024) includes a transitive dependency on marshmallow that is vulnerable to CVE-2025-68480. This creates an ironic situation where the security scanning tool itself ships with a known vulnerability.
Vulnerability Details
- CVE: [CVE-2025-68480](https://nvd.nist.gov/vuln/detail/CVE-2025-68480)
- Severity: Moderate (CVSS 5.3)
- Issue: DoS vulnerability in
Schema.load(data, many=True)where moderately sized requests can consume disproportionate CPU time - Affected versions:
marshmallow >= 3.0.0rc1, < 3.26.2andmarshmallow >= 4.0.0, < 4.1.2 - Patched versions:
marshmallow >= 3.26.2ormarshmallow >= 4.1.2
Validation Timeline
This vulnerability has been thoroughly validated through multiple independent reviews:
- December 21, 2025: Marshmallow maintainers confirmed the vulnerability and released patches (3.26.2, 4.1.2)
- December 22, 2025: GitHub Security Advisory Database reviewed and officially published GHSA-428g-f7cq-pgp5
- December 22, 2025: Submitted to the National Vulnerability Database (NVD) as CVE-2025-68480
GitHub's security team doesn't submit vulnerabilities to the NVD without thorough review—this multi-stage validation confirms this is a genuine security issue, not a false positive. I've waited until after this official review process to file this issue out of respect for responsible disclosure timing.
Current Dependency Constraint
From [pyproject.toml](https://github.com/pyupio/safety/blob/main/pyproject.toml#L32):
"marshmallow>=3.15.0", # TODO: To be removedThis constraint allows installation of all vulnerable marshmallow versions from 3.15.0 up through 4.1.1 (including the entire vulnerable 4.0.x series).
Recommended Fix
Since the comment indicates marshmallow is planned for removal, you have two options:
Option 1 (if removal is imminent): Remove the marshmallow dependency entirely
Option 2 (if still needed): Update to require the patched version:
"marshmallow>=4.1.2", # ✅ CVE-2025-68480 patchedOr if you need to maintain compatibility with the 3.x series:
"marshmallow>=3.26.2,!=4.0.*,!=4.1.0,!=4.1.1", # ✅ Excludes vulnerable 4.0-4.1.1Temporary Workaround
Users can override this by explicitly pinning marshmallow in their own dependencies:
"marshmallow>=4.1.2" # Override safety's vulnerable transitive dependency
"safety>=3.7.0"Pip's dependency resolver will install marshmallow>=4.1.2, satisfying both constraints.
Request
Could you please release a patch version (e.g., safety==3.7.1) with the updated marshmallow constraint—or better yet, remove it entirely if that TODO is ready to be addressed? This would help protect the broader Python ecosystem from this DoS vulnerability.
Additional Context
I previously reported a similar issue with authlib via email on November 23, 2025, and appreciate that safety 3.6.2 was released promptly afterward addressing that concern. Given your team's track record of responsive security maintenance, I'm confident you'll want to address this quickly as well.
Thank you for maintaining such an important security tool for the Python community!
References
- GitHub Advisory (Reviewed): GHSA-428g-f7cq-pgp5
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2025-68480
- Marshmallow patch commit: marshmallow-code/marshmallow@d24a0c9
Python version
All versions (3.9-3.14 supported by safety 3.7.0)
Operating System
All operating systems (detected via automated dependency scanning tools like Dependabot)
Bug description
The security scanning tool safety itself contains a known security vulnerability in its transitive dependency marshmallow.
What I was trying to do:
Run routine security scans on my Python project using safety 3.7.0
What I expected to happen:
Safety would scan dependencies without itself containing known vulnerabilities
What actually happened:
Dependabot and security scanners flagged CVE-2025-68480 in marshmallow (a transitive dependency of safety 3.7.0), creating an ironic situation where the security tool itself has a vulnerability
Steps to reproduce
- Install safety 3.7.0:
pip install safety==3.7.0 - Check transitive dependencies:
pip show marshmallow - Observe that marshmallow version can be anywhere from 3.15.0 to 4.1.1 (including vulnerable versions)
- Run any vulnerability scanner (Dependabot, Snyk, or even safety itself on a environment with marshmallow <4.1.2)
- Observe CVE-2025-68480 flagged for marshmallow
Alternatively:
- Check safety's dependency constraint in pyproject.toml
- Note:
"marshmallow>=3.15.0", # TODO: To be removed - This allows all vulnerable versions through 4.1.1
Command and output
$ pip install safety==3.7.0
# (installation output)
$ pip show marshmallow
Name: marshmallow
Version: 4.1.1 # or any version <4.1.2
# ... shows it was installed as dependency of safety
# When running security scanners:
# Dependabot Alert Example:
Transitive dependency marshmallow 4.1.1 is introduced via safety 3.7.0
CVE-2025-68480: Moderate severity DoS vulnerability in Schema.load(many=True)
---
**Additional context**
This vulnerability was officially validated through multiple independent reviews:
1. **December 21, 2025**: Marshmallow maintainers confirmed and patched (versions 3.26.2, 4.1.2)
2. **December 22, 2025**: GitHub Security Advisory Database officially published GHSA-428g-f7cq-pgp5
3. **December 22, 2025**: Submitted to National Vulnerability Database as CVE-2025-68480
**Recommended fix:**
Since your pyproject.toml already has `# TODO: To be removed` next to the marshmallow dependency, this might be a good opportunity to either:
- Remove the marshmallow dependency entirely (if that TODO is ready), OR
- Update to `"marshmallow>=4.1.2"` to exclude vulnerable versionsAdditional context
I previously reported a similar authlib vulnerability via email (11/23/25), and safety 3.6.2 was released promptly afterward. Thank you for your responsive security maintenance!
References:
- GitHub Advisory (Reviewed): GHSA-428g-f7cq-pgp5
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2025-68480
- Marshmallow patch: marshmallow-code/marshmallow@d24a0c9