CVE-2026-133429
Pydantic validation bypass of extra keys in JSON model parsing
An unauthenticated attacker can send JSON that slips extra keys of the wrong type past validation.
Texto original en inglés · Ver en español
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
Fuente: CNA
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 2.14.2 | pydantic · -22 d desde divulgación | |
| Divulgación | Publicada | CVE-2026-133429 divulgada · CVSS 6.3 (CNA) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Divulgación | Evaluación SSVC | CISA-ADP · explotación ninguna | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Fuente: NIST NVD | Registro visto por primera vez en NIST NVD | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Pydantic, a Python data validation library, has a validation bypass when parsing JSON into models that allow extra keys with a typed key annotation. Remotely, without logging in, an attacker who supplies untrusted JSON can get extra data past validation whose keys don't match the declared key type.
Descripción original del registro (Pydantic)
When validating JSON data into a model allowing extra data, the keys of extra data aren't validated against the key type annotated on __pydantic_extra__, resulting in extra data not matching the declared type. This is the case if you define __pydantic_extra__ as e.g. dict[Annotated[str, Field(pattern=r'^x_')], int]. The validate_json_by_iteration() method (in pydantic-core/src/validators/model_fields.rs), used to validate JSON data into models, only validates the values of extra data, and stores the keys as is. The issue was fixed in commit 4c65dbda9970a488e2ff21c8693fc6f6d70a3358. Impact: validation bypass, as extra data returned by validation doesn't match the declared type. Affected are applications validating untrusted JSON data into models allowing extra data (with extra='allow'), with a key type annotated on __pydantic_extra__ (e.g. dict[Annotated[str, Field(pattern=...)], int]), using Pydantic from 2.13.0 up to (but excluding) 2.14.2. Python mode validation isn't affected.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypipydantic |
Corregida | 2.14.2 | -22 d | 2.14.4 no afectada |
2.14.2Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/pydantic/pydantic/security/advisories/GHSA-qpmf-fgh3-ff25https://github.com/pydantic/pydantic/blob/v2.13.5/pydantic-core/src/validators/model_fields.rs#L540https://github.com/pydantic/pydantic/blob/v2.13.5/pydantic-core/src/validators/model_fields.rs#L605-L623https://github.com/pydantic/pydantic/commit/4c65dbda9970a488e2ff21c8693fc6f6d70a3358Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
