Quadratic time and memory multi-host URL validation
Summary
| CVE | CVE-2026-133428 |
|---|---|
| State | PUBLISHED |
| Assigner | Pydantic |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-20 08:18:32 UTC |
| Updated | 2026-11-20 18:18:48 UTC |
| 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). |
Risk And Classification
Primary CVSS: v4.0 6.3 MEDIUM from 7cec5f2f-3032-4006-8740-31f605ffab5f
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
Problem Types: CWE-407 | CWE-407 CWE-407: Inefficient Algorithmic Complexity
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | 7cec5f2f-3032-4006-8740-31f605ffab5f | Secondary | 6.3 | MEDIUM | 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/C... |
| 4.0 | CNA | DECLARED | 6.3 | MEDIUM | 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 |
CVSS v4.0 Breakdown
Attack Vector
NetworkAttack Complexity
LowAttack Requirements
PresentPrivileges Required
NoneUser Interaction
NoneConfidentiality
NoneIntegrity
NoneAvailability
LowSub Conf.
NoneSub Integrity
NoneSub Availability
NoneCVSS: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
Vendor Declared Affected Products
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/pydantic/pydantic/blob/v2.13.5/pydantic-core/src/validators/u... | 7cec5f2f-3032-4006-8740-31f605ffab5f | github.com | |
| github.com/pydantic/pydantic/commit/b4028f9d87e34750e53be0ba011d70f3c0fc... | 7cec5f2f-3032-4006-8740-31f605ffab5f | github.com | |
| github.com/pydantic/pydantic/blob/v2.13.5/pydantic-core/src/validators/u... | 7cec5f2f-3032-4006-8740-31f605ffab5f | github.com | |
| github.com/pydantic/pydantic/security/advisories/GHSA-955g-x97g-8mcp | 7cec5f2f-3032-4006-8740-31f605ffab5f | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: iamibi (en)
There are currently no legacy QID mappings associated with this CVE.