Skip to main content

pydantic CVE-2026-133428

| EUVDEUVD-2026-131090 MEDIUM
Inefficient Algorithmic Complexity (CWE-407)
2026-11-20 Pydantic
6.3
CVSS 4.0 · Vendor: Pydantic
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify endpoint validating untrusted multi-host URL
  2. Delivery
    Craft long-scheme string with many hosts
  3. Exploit
    Submit to PostgresDsn/MultiHostUrl validator
  4. Execution
    Trigger quadratic per-host prefix re-parsing
  5. Persist
    Exhaust server memory and CPU
  6. Impact
    Worker slowdown or crash (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires that the target application validate attacker-controlled or otherwise untrusted strings into a multi-host URL field - specifically PostgresDsn, MongoDsn, NatsDsn, or a custom type built on MultiHostUrl - on an affected pydantic version (>=2.0.0,<2.14.0). The malicious input must combine an arbitrarily long URL scheme with many hosts so the prefix is re-parsed once per host; allowed-scheme checks (e.g., 'postgres') happen only after parsing and do not block the input. Limiting factors: applications that never pass untrusted data into a multi-host URL type are not exposed; single-host URL types (AnyUrl/HttpUrl) are not implicated; and upgrading to 2.14.0 removes the quadratic path. No authentication or user interaction is required to supply the payload once such a sink is reachable.

Impact

Signals converge on a genuine-but-moderate priority rather than an emergency. The provider CVSS 4.0 score is 6.3 (medium), and the vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N) shows the only impact is Availability-Low with no confidentiality or integrity effect - consistent with CWE-407 (algorithmic complexity / quadratic resource consumption), not code execution or data exposure. The AT:P (attack requirement present) metric is the key qualifier: exploitation is not universal but depends on the application actually feeding untrusted input into a multi-host URL field. No EPSS score, SSVC exploitation/automatable/technical-impact decision, or CISA KEV status is provided in the input, so those signals cannot be weighed and should not be assumed. The vuln.today priority is 'this_month' (not act_now/emergency), aligning with a medium-severity, availability-only DoS. There is no confirmed active exploitation and no standalone public exploit; the fix commit does, however, include a regression test that reproduces the quadratic blow-up (~1 GB memory for ~100 KB input), so a working trigger is effectively documented. Net: a real, worth-patching availability bug for applications that validate untrusted strings into PostgresDsn/MongoDsn/NatsDsn/MultiHostUrl fields, but not a drop-everything issue absent such an exposed sink.

Exploit ScenarioDerived

An application exposes an endpoint (e.g., a connection-string or configuration field) that validates attacker-supplied text into a multi-host URL type such as PostgresDsn. The attacker submits a ~100 KB string with a very long scheme and many comma-separated hosts; pydantic-core re-parses the entire long prefix once per host, consuming roughly a gigabyte of memory and large CPU time, degrading or crashing the worker. No standalone public exploit was identified, but the fix commit contains a regression test that reproduces the quadratic behavior, and the low attack complexity (AC:L) means the payload is trivial to craft once such an input path exists.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 20, 2026

A quadratic time and memory blowup exists in pydantic's multi-host URL validation: crafted input pairing an arbitrarily long URL scheme with many comma-separated hosts consumes roughly a gigabyte of memory for about a hundred kilobytes of input. Applications are exposed only if they validate untrusted strings into PostgresDsn, MongoDsn, NatsDsn, or a custom type built on MultiHostUrl on pydantic versions 2.0.0 through 2.13.x; single-host types such as AnyUrl and HttpUrl are unaffected. No public exploit code or confirmed active exploitation was identified at time of analysis, and the issue is fixed in pydantic 2.14.0.

RemediationAI

Upgrade to pydantic 2.14.0 (pip install --upgrade 'pydantic>=2.14.0'), which removes the quadratic parsing path; the fix is the upstream commit b4028f9d87e34750e53be0ba011d70f3c0fcc94e, detailed in advisory GHSA-955g-x97g-8mcp at https://github.com/pydantic/pydantic/security/advisories/GHSA-955g-x97g-8mcp. If upgrading is not immediately possible, the practical compensating control is to bound the size of any string accepted into PostgresDsn, MongoDsn, NatsDsn or custom MultiHostUrl fields before validation - enforcing a maximum length and a maximum number of comma-separated hosts - since the blowup scales with input size; the trade-off is that legitimately large host lists or unusually long schemes will be rejected, so limits must be set from observed legitimate traffic. Deployments that never pass untrusted input into multi-host URL types are not exposed and can schedule the upgrade routinely. Neither a vendor-stated workaround nor an indication that any mitigation other than upgrading is complete is provided in the available sources.

Affected VersionsENISA

Pydantic 2.0.0 <2.14.0

Affected Packages

euvd pydantic fix: 2.14.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is a CWE-407 algorithmic complexity problem in pydantic-core's URL parsing, written in Rust. When validating a multi-host URL, parse_multihost_url() in pydantic-core/src/validators/url.rs parses each host separately, reconstructing a full URL for every host by prepending the original URL prefix, including the scheme, to that host. Because the scheme may be arbitrarily long, the prefix is copied once per host, so both time and memory grow quadratically with input size. Scheme allow-listing provides no protection, since permitted schemes such as 'postgres' are enforced only after parsing completes. The upstream fix replaces the reused prefix with a short normalized prefix: a placeholder scheme ('x') is used for non-special schemes, whose hosts parse independently of the scheme, while special schemes (which are short and can affect host parsing or default ports) are retained as-is. Stored-host reconstruction in pydantic-core/src/url.rs was adjusted correspondingly to skip the scheme-plus-three-characters prefix rather than a host offset. Whether a deployment is exposed depends on whether untrusted strings reach a multi-host URL field; the trigger for the excessive allocation is attacker control over both the scheme length and the number of hosts, per the advisory.

Know when Pydantic gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (Pydantic) PRIMARY 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
vuln.today AI 5.3 MEDIUM

Network-reachable untrusted input with no auth or interaction (AV:N/AC:L/PR:N/UI:N); only bounded resource-exhaustion availability impact (A:L), no confidentiality or integrity effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (Pydantic).

CVSS VectorVendor: Pydantic

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 20, 2026 - 09:02 EUVD
CVE Published
Nov 20, 2026 - 07:32 cve.org
MEDIUM 6.3

DescriptionCVE.org

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).

Threat Intelligence Overview

EPSS Score
0.7%
Top 46% exploitable
Prevalence
High
pydantic is a core validation library across most modern Python web stacks
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.7%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

33
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-55526 CRITICAL POC
9.1 Aug 26

n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w

CVE-2026-25580 HIGH POC
8.6 Feb 06

Pydantic AI versions 0.0.26 through 1.55.x contain a server-side request forgery vulnerability in URL download functiona

CVE-2024-3772 HIGH POC
7.5 Apr 15

Regular expression denial of service in Pydanic < 2.4.0, < 1.10.13 allows remote attackers to cause denial of service vi

CVE-2026-84381 HIGH
8.1 Sep 02

HTTPX2's SOCKS5 proxy implementation omits TLS negotiation for WebSocket Secure (wss://) origins, exposing the full WebS

CVE-2026-107295 HIGH
7.6 Oct 08

Cross-site request forgery in Pydantic AI's development web chat UI allows any website a developer happens to visit whil

CVE-2026-107286 HIGH
7.5 Oct 08

Concurrency slot exhaustion in Pydantic AI 2.10.0 through 2.52.x lets streamed model requests permanently occupy slots i

CVE-2026-133161 HIGH
7.5 Nov 19

Denial of service in Pydantic AI Harness (pydantic-ai-harness) 0.4.0 through 0.69.0 lets attacker-influenced tool output

CVE-2026-84382 HIGH
7.5 Sep 02

Memory exhaustion via unbounded decompression in HTTPX2 (all versions before 2.12.0) allows any HTTP server the client c

CVE-2021-29510 HIGH
7.5 May 13

Pydantic is a data validation and settings management using Python type hinting. Rated high severity (CVSS 7.5), this vu

CVE-2026-133421 MEDIUM
6.9 Nov 20

Quadratic-time validation of untrusted ISO 8601 duration strings in Pydantic V1 lets remote attackers exhaust CPU by sub

CVE-2026-133422 MEDIUM
6.9 Nov 20

Denial of service in Pydantic V1 arises when an application validates attacker-supplied lists into a field constrained w

CVE-2026-48782 MEDIUM
6.8 Jun 16

Server-Side Request Forgery in Pydantic AI (versions 1.56.0-1.101.0, 2.0.0b1, 2.0.0b2) allows unauthenticated network at

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy