Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify endpoint with unique_items=True list field
-
DeliveryCraft large duplicate-free list payload
-
ExploitSubmit untrusted list to validator
-
ExecutionTrigger quadratic item comparisons
-
ImpactExhaust CPU/worker capacity (DoS)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitable only when an application uses Pydantic V1 - either the pydantic 1.9.0-1.10.26 package or the pydantic.v1 compatibility namespace inside Pydantic V2 before 2.14.2 - and defines a list field with the unique_items=True constraint via conlist() or Field(), and that field validates untrusted/attacker-supplied list input. Limiting factors: unique_items=True is an explicit, non-default constraint, so applications not using it are unaffected; native Pydantic V2 models are not affected at all; and the worst case is a valid (duplicate-free) list, which is what makes the quadratic scan run to completion. Note the fix is partial: after patching, only lists of builtin scalar types (int, float, str, bytes, bool, None) are checked in linear time, while lists of non-scalar items (models, dicts, nested lists) remain quadratic and must be bounded with max_items. |
| Impact | This is a genuine but moderate-priority issue, best treated as routine patching rather than an emergency, consistent with the input's 'this_month' decision label. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) shows the quadratic blowup is remotely reachable with low complexity and no authentication or user interaction, but impact is confined to availability (VA:L) with no confidentiality or integrity effect - the official 6.9 and an independent assessment both land in the medium range. No EPSS score was supplied and the CVE is not on CISA KEV, so there is no evidence of active exploitation; exploitation status is 'no public exploit identified at time of analysis.' The references consist only of the GHSA advisory, the vulnerable source lines, the fix commit, and the release notes - all remediation artifacts, not a weaponized proof of concept. The decisive risk-limiter is scope: the flaw only bites applications that use Pydantic V1 (or the pydantic.v1 compatibility namespace under V2) AND declare a field with unique_items=True via conlist()/Field() AND feed attacker-controlled lists into it. Native Pydantic V2 models are entirely unaffected. So despite a clean network-unauthenticated vector, real-world exposure depends heavily on a specific, non-default validation configuration. |
| Exploit ScenarioDerived | An attacker submits a few hundred kilobytes of unique list elements to an API endpoint whose Pydantic V1 model constrains that field with unique_items=True; the quadratic unique_items_validator spends seconds per request comparing every item against all following ones, and repeated requests exhaust worker threads to cause denial of service. Because the CVSS vector is AV:N/AC:L/PR:N/UI:N, this needs only network access to a vulnerable, unauthenticated endpoint and no special skill. No public exploit code is identified; the only published artifacts are the advisory and the fix. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 20, 2026
Denial of service in Pydantic V1 arises when an application validates attacker-supplied lists into a field constrained with unique_items=True: the duplicate check performs a quadratic number of comparisons, so a few hundred kilobytes of input can occupy the validator for seconds. Affected are the standalone pydantic package from 1.9.0 through 1.10.26 and, in Pydantic V2 before 2.14.2, code that uses the pydantic.v1 compatibility namespace; native Pydantic V2 models are not affected. Only fields declared with conlist(..., unique_items=True) or Field(unique_items=True) that receive untrusted input are exposed, and the worst case is a valid duplicate-free list, which drives the full quadratic scan; the impact is limited to availability (CVSS 6.9, A:L), no public exploit was identified at time of analysis, and the vendor rates it as routine patching rather than an emergency.
RemediationAI
Upgrade to Pydantic 1.10.27 or later on the V1 line, or to Pydantic 2.14.2 or later if you rely on the pydantic.v1 namespace within V2 (vendor advisory: https://github.com/pydantic/pydantic/security/advisories/GHSA-49g6-96jj-f7r9; fix commit: https://github.com/pydantic/pydantic/commit/6ec75e57f277a820ec583e601167f25fe8dc7c87). Patching alone does not fully close the issue for lists whose items are not builtin scalars: after the fix, only int, float, str, bytes, bool and None lists are checked in linear time, while lists of models, dicts or nested lists are still compared quadratically and must be bounded with the max_items constraint, with the trade-off that legitimate large lists will be rejected. Where upgrading is not immediately possible, the actionable options are to remove unique_items=True from conlist()/Field() declarations that accept untrusted input and perform the deduplication after validation in application code, or to cap the accepted list length (for example with max_items) at the request-parsing layer so the quadratic scan cannot be driven to a costly input size; both require reviewing every model that declares the constraint, and the first shifts duplicate-handling responsibility into application logic.
Affected VersionsENISA
Affected Packages
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 root cause is CWE-407 (inefficient algorithmic complexity) in the ConstrainedList.unique_items_validator in pydantic/types.py, which iterated over the list and, for each element, tested membership against the remaining slice (value in v[i:]). Both the slicing and the linear membership scan are repeated for every element, giving O(n^2) work that runs to completion precisely in the common, valid case where no duplicates exist. The upstream commit 6ec75e57f277a820ec583e601167f25fe8dc7c87 rewrites the check: if every element's type is in a set of builtin hashable scalars (int, float, str, bytes, bool, None), duplicates are detected in linear time via len(set(v)) != len(v); otherwise the original quadratic scan is retained because arbitrary items (models, dicts, nested lists) are not guaranteed to be hashable. Consequently the fix is partial by design, and non-scalar element types remain susceptible unless the list length is bounded with max_items. The library is a Python data-validation layer commonly exposed at API boundaries, so the cost is incurred synchronously during request parsing.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Remotely reachable untrusted list input with no auth or interaction (AV:N/AC:L/PR:N/UI:N); only availability is degraded via CPU exhaustion (A:L), no confidentiality or integrity impact.
Primary rating from Vendor (Pydantic).
CVSS VectorVendor: Pydantic
DescriptionCVE.org
Validating an untrusted list into a field constrained with unique_items=True with Pydantic V1 takes quadratic time: an input of a few hundred kilobytes takes seconds to validate.
The ConstrainedList.unique_items_validator validator (in pydantic/types.py) checks each item against all the following ones. For a list with no duplicates (the common, valid case), this results in a quadratic number of comparisons.
The issue was fixed in commit 6ec75e57f277a820ec583e601167f25fe8dc7c87. Users relying on the pydantic.v1 namespace in Pydantic V2 should upgrade to 2.14.2 or later.
Impact: denial of service through validation of untrusted input. Affected are applications validating untrusted lists into fields constrained with unique_items=True (using conlist() or Field()).
The fix only applies to lists of builtin scalar types (int, float, str, bytes, bool and None), for which duplicates can be detected in linear time. Lists of other types (e.g. models or dictionaries) are still checked in quadratic time, as their items aren't guaranteed to be hashable: bound their size using the max_items constraint.
Pydantic V2 models are not affected.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w
Pydantic AI versions 0.0.26 through 1.55.x contain a server-side request forgery vulnerability in URL download functiona
Regular expression denial of service in Pydanic < 2.4.0, < 1.10.13 allows remote attackers to cause denial of service vi
HTTPX2's SOCKS5 proxy implementation omits TLS negotiation for WebSocket Secure (wss://) origins, exposing the full WebS
Cross-site request forgery in Pydantic AI's development web chat UI allows any website a developer happens to visit whil
Concurrency slot exhaustion in Pydantic AI 2.10.0 through 2.52.x lets streamed model requests permanently occupy slots i
Denial of service in Pydantic AI Harness (pydantic-ai-harness) 0.4.0 through 0.69.0 lets attacker-influenced tool output
Memory exhaustion via unbounded decompression in HTTPX2 (all versions before 2.12.0) allows any HTTP server the client c
Pydantic is a data validation and settings management using Python type hinting. Rated high severity (CVSS 7.5), this vu
Quadratic-time validation of untrusted ISO 8601 duration strings in Pydantic V1 lets remote attackers exhaust CPU by sub
Server-Side Request Forgery in Pydantic AI (versions 1.56.0-1.101.0, 2.0.0b1, 2.0.0b2) allows unauthenticated network at
Server-side request forgery in Pydantic AI's URL-fetching guards lets an application that has explicitly opted a URL int
EUVD-2026-131093
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB