p PatchFirst

CVE-2026-133429

CVE-2026-133429 · Validation bypass of extra data keys in JSON model validation

CVSS 6.3 · Medium · EPSS 0.5% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Check the installed version:

dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="pydantic"'

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

Published
Updated

Stack: system

Affected products and versions

  • pydantic

    Versions
    • ≥ 2.13.0, < 2.14.2: Affected (python)

    Update to 2.14.2

  • pydantic Debian 14

    Versions
    • 2.10.6-2
    • 2.12.0~a1-1
    • 2.12.2-1
    • 2.12.3-1
    • 2.12.3-2
    • 2.12.4-1
    All versions (16)
    • 2.12.5-1
    • 2.12.5-2
    • 2.13.3-1
    • 2.13.4-1
    • 2.13.4-3
    • 2.13.4-4
    • 2.13.5-1
    • 2.13.5-2
    • 2.14.0-1
    • 2.14.1-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pydantic Ubuntu Pro 20.04 LTS

    Versions
    • 0.30.1-1
    • 1.2-1
    • 1.2-1ubuntu0.1~esm1
    • 1.2-1ubuntu0.1~esm3
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pydantic Ubuntu Pro 22.04 LTS

    Versions
    • 1.7.4-1
    • 1.8.2-1
    • 1.8.2-1ubuntu0.1~esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pydantic Ubuntu 24.04 LTS

    Versions
    • 1.10.4-1ubuntu1
    • 1.10.13-0ubuntu1
    • 1.10.14-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pydantic Ubuntu 26.10

    Versions
    • 2.12.5-2
    • 2.13.4-3
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • pydantic Ubuntu 26.04 LTS

    Versions
    • 2.10.6-2
    • 2.12.5-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →