CVE-2026-133424
published medium CVSS 4.0 · 6.3Validation bypass of aliased fields in TypedDict and dataclasses allowing extra data
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| pydantic | — | pydantic2.0 to < 2.14.2 · Other versions: unaffected | Affected | Not stated | Pydantic |
Description
When extra data is allowed, providing both the alias and the name of an aliased TypedDict or dataclass field makes the unvalidated value (provided under the name) overwrite the validated one (provided under the alias), resulting in validated data not matching the declared type. Extra items are stored in the same dictionary as the fields (the returned dictionary for TypedDict, the instance __dict__ for dataclasses). As only the alias is marked as used, the field name is treated as an extra item, and its unvalidated value overrides the validated one. The TypedDict validator (pydantic-core/src/validators/typed_dict.rs) and the dataclass validator (pydantic-core/src/validators/dataclass.rs) share this logic. The issue was fixed in commit 34491f5328f168f14e3769cd5f0f83c0af0f4778. Impact: validation bypass, as data returned by validation doesn't match the declared type. Affected are applications validating untrusted data into TypedDict or dataclass types with aliased fields and extra data allowed (with extra='allow', or with the extra_items argument for TypedDict), using Pydantic V2 (up to and including 2.14.1). Pydantic models (BaseModel) are not affected, as extra data is stored separately from fields.
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:L/VA:N/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 to < 2.14.2 (affected · python)Default: unaffected | Pydantic · cna |
Weaknesses
1- CWE-20 CWE-20: Improper Input Validation
References
4- https://github.com/pydantic/pydantic/blob/becee9cc0ef8132e854762448fde76aa56608c6b/pydantic-core/src/validators/dataclass.rs#L215-L342
- https://github.com/pydantic/pydantic/blob/becee9cc0ef8132e854762448fde76aa56608c6b/pydantic-core/src/validators/typed_dict.rs#L204-L225
- https://github.com/pydantic/pydantic/commit/34491f5328f168f14e3769cd5f0f83c0af0f4778
- https://github.com/pydantic/pydantic/security/advisories/GHSA-3r8g-cqwr-jr29
Provider assertions
2Pydantic · cna
Validation bypass of aliased fields in TypedDict and dataclasses allowing extra data
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- df5bd97df5195b5b494a8a75c76bf328af0a285ac8fae3ecb4694773a8f62bdd
- Ingested
- 20 Nov 2026, 17:26:19 UTC
- Source record
- Official CVE record