CVE-2026-133428
published medium CVSS 4.0 · 6.3Quadratic time and memory multi-host URL validation
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| pydantic | — | pydantic2.0.0 to < 2.14.0 · Other versions: unaffected | Affected | Not stated | Pydantic |
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).
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.3 / 10
- Severity
- medium
- Provider
- Pydantic · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| pydantic | pydantic | 2.0.0 to < 2.14.0 (affected · python)Default: unaffected | Pydantic · cna |
Weaknesses
1- CWE-407 CWE-407: Inefficient Algorithmic Complexity
References
4- https://github.com/pydantic/pydantic/blob/v2.13.5/pydantic-core/src/validators/url.rs#L537
- https://github.com/pydantic/pydantic/blob/v2.13.5/pydantic-core/src/validators/url.rs#L644-L649
- https://github.com/pydantic/pydantic/commit/b4028f9d87e34750e53be0ba011d70f3c0fcc94e
- https://github.com/pydantic/pydantic/security/advisories/GHSA-955g-x97g-8mcp
Provider assertions
2Pydantic · cna
Quadratic time and memory multi-host URL validation
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- f87de394482ef52799e8a8c92dc7fe6b167a460d93e108314ebe8b10ce894837
- Ingested
- 20 Nov 2026, 17:26:19 UTC
- Source record
- Official CVE record