Quadratic time and memory use in pydantic multi-host URL validation
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Partial Red Hat: 18 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-407.
Summary
Pydantic from 2.0.0 before 2.14.0 takes quadratic time and memory to validate untrusted URLs with a long scheme and many hosts into multi-host URL fields such as PostgresDsn. The parse_multihost_url() function parses the whole URL prefix, including the scheme, once for each host, so an input of about a hundred kilobytes needs around a gigabyte of memory. A remote unauthenticated attacker can exhaust resources and cause a denial of service in applications that validate untrusted input into these fields (CWE-407).
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
Description from the CNA
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).
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Upgrade pydantic to 2.14.0 or later, which contains the fix in commit b4028f9. Red Hat lists Red Hat Enterprise Linux 9, Red Hat Enterprise Linux 10 and other products as affected with no plan available.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
- Fix · CNA pydantic (pydantic) Fixed in 2.14.0
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
pydantic 2.14.0
2 records Highest priority Priority LOW 2 LOW
Other records, highest priority first
- TI-2026-95642 Unbounded exponent in Pydantic Fraction validationPriority LOW 29
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Ansible Automation Orchestrator 2026 | Affected | No fix yet: Fix deferred |
| Exploit Intelligence | Affected | No fix yet: Fix deferred |
| Lightspeed Core | Affected | No fix yet: Fix deferred |
| Lightspeed Services for Advanced Cluster Management | Affected | No fix yet: Fix deferred |
| Migration Toolkit for Applications 8 | Affected | No fix yet: Fix deferred |
| OpenShift Lightspeed | Affected | No fix yet: Fix deferred |
| Red Hat AI Inference Server | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Discovery 2 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux command line assistant | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Virtualization 4 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Virtualization 5 | Affected | No fix yet: Fix deferred |
| Red Hat Satellite 6 | Affected | No fix yet: Fix deferred |
| Red Hat Trusted Artifact Signer | Affected | No fix yet: Fix deferred |
Timeline
- 2026-11-20 Threatist record created from CVE-2026-133428
- 2026-11-20 Affected versions changed · Red Hat
- 2026-11-20 CVSS score added · Red Hat
- 2026-11-20 CISA SSVC decision points changed
- 2026-11-25 EPSS moved to the below the 50th percentile
References
More pydantic vulnerabilities
- TI-2024-03518 Regular expression denial of service in Pydantic < 2.4.0 CVSS 3.1HIGH 7.5
- TI-2026-57990 HTTPX2: Multipart part header injection via unvalidated file Content-Type and custom headers CVSS 3.1MEDIUM 5.3
- TI-2026-41916 Path traversal in pydantic-settings CVSS 3.1MEDIUM 5.3
- TI-2026-20687 Pydantic AI Affected by Server-Side Request Forgery (SSRF) in URL Download Handling CVSS 3.1HIGH 8.6
- TI-2026-69551 Pydantic AI keeps concurrency slots after streams end early CVSS 3.1HIGH 7.5
- TI-2026-57993 HTTPX2: Streaming response decompression does not bound peak memory (decompression amplification) CVSS 3.1HIGH 7.5
Sources
- CVE-2026-133428 · CVE Program
- CVE-2026-133428 · NVD
- FIRST EPSS
- CVE-2026-133428 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences