CVE-2026-133428Pydantic inefficient algorithmic complexity
CVSS score
6.3
Medium
CVSS 4.0 from 7cec5f2f-3032-4006-8740-31f605ffab5f
Exploit probability (EPSS)
0.86%
0.86% chance of exploitation in the next 30 days, higher than 59.5% of all CVEs.
CISA KEV
Not in KEV
No confirmed exploitation reported by CISA so far.
Official description
Validating an untrusted URL with a long scheme and many hosts into a multi-host URL field (e.g. PostgresDsn) takes quadratic time and memory: an input of about a hundred kilobytes takes around a gigabyte of memory to validate.
The parse_multihost_url() function (in pydantic-core/src/validators/url.rs) parses each host separately, prepending the whole URL prefix (including the scheme) to every one of them. As the scheme can be arbitrarily long, and is parsed and stored once per host, both time and memory grow quadratically with the input size. Allowed schemes (e.g. postgres for PostgresDsn) are only checked after parsing, so they don't prevent the issue.
The issue was fixed in commit b4028f9d87e34750e53be0ba011d70f3c0fcc94e.
Impact: denial of service through validation of untrusted input. Affected are applications validating untrusted strings into multi-host URL fields (PostgresDsn, MongoDsn, NatsDsn, or custom types built on MultiHostUrl).
Source: NVD · CNA: 7cec5f2f-3032-4006-8740-31f605ffab5f
How to fix it, step by step
Check whether you're affected
Find every system running Pydantic and compare its version with the affected versions.
Update to a fixed version
- Update Pydantic to 2.14.0 or later.
Confirm the fix
Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.
Was this useful?
How it can be exploited
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- Present
- Privileges required
- None
- User interaction
- None
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Values in red make the vulnerability easier to exploit or more damaging. CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Affected products
| Affected products | Versions |
|---|---|
| pydantic Pydantic | ≥ 2.0.0, < 2.14.0 |
Weakness
- CWE-407 inefficient algorithmic complexity
Timeline
- Published:
- Last modified:
Frequently asked questions
Is CVE-2026-133428 being exploited?
There is no confirmed exploitation in CISA's KEV catalog so far. Its EPSS score estimates a 0.9% probability of exploitation in the next 30 days.
What is the CVSS score of CVE-2026-133428?
CVE-2026-133428 has a CVSS 4.0 base score of 6.3 (medium).
Which versions are affected?
Pydantic Pydantic (≥ 2.0.0, < 2.14.0)
Is there a patch for CVE-2026-133428?
The official record links to vendor advisories or patches; see “What to do” above.
References
- github.com/pydantic/pydantic/blob/v2.13.5/pydantic-core/src/validators/url.rs#L537
- github.com/pydantic/pydantic/blob/v2.13.5/pydantic-core/src/validators/url.rs#L644-L649
- github.com/pydantic/pydantic/commit/b4028f9d87e34750e53be0ba011d70f3c0fcc94e
- github.com/pydantic/pydantic/security/advisories/GHSA-955g-x97g-8mcp
Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.