Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

CVE-2026-107293 — pydantic-ai

Fix: pydantic/pydantic-ai@fe9dbed

CVE-2026-107293 is a CWE-212 vulnerability in pydantic-ai. A fix is available for pydantic-ai — see the affected versions and patch details below.

Pydantic AI OpenTelemetry instrumentation: retry prompt content is not redacted when `include_content=False`

Also known asGHSA-3gh4-cghq-f8v4PYSEC-2026-4274PYSEC-2026-4283
Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed
Exploitation data as of Oct 22, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-107293.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs21th percentile — riskier than 21% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

4 pkgs affected
🐍pydantic-ai🐍pydantic-ai🐍pydantic-ai-slim🐍pydantic-ai-slim

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Summary

Pydantic AI's OpenTelemetry instrumentation supports InstrumentationSettings(include_content=False) to exclude message content — user prompts, model completions, tool call arguments and responses — from exported telemetry, so that agents can be monitored without sending sensitive content to the observability backend.

Retry prompts — the feedback messages Pydantic AI sends back to the model when its output fails validation or an output validator raises ModelRetry — were not covered by this setting when they were not associated with a tool call, as with structured output modes that don't use tool calls (e.g. NativeOutput or PromptedOutput) and output validators applied to text output. Their full content was recorded on model request spans even with include_content=False. Since validation feedback can quote invalid values from the model's response, message content that the setting was configured to withhold could reach the telemetry backend.

Details

Retry prompts without an associated tool call were serialized into span message attributes (such as gen_ai.input.messages and pydantic_ai.all_messages) as regular text parts, and this path did not apply the include_content check that every other message part applies. Retry prompts tied to a tool call, and all other message content, were redacted correctly.

Impact

This does not grant an attacker any new access to the agent or its data: the content is only visible to whoever can read the exported telemetry. The exposure matters when traces are exported to a destination whose audience is broader or less trusted than the agent's own data — a third-party observability vendor or a shared backend — which is the scenario include_content=False exists for. The disclosed content is limited to retry feedback: validation error details, which can quote invalid values from the model's output, or output-validator ModelRetry messages.

Who Is Affected

You are affected if you enabled instrumentation with include_content=False and your agent can produce retry prompts outside of tool calls: it uses a structured output mode that doesn't rely on tool calls (such as NativeOutput or PromptedOutput), or output validators on text output. You are not affected if you don't set include_content=False, or if all of your agent's retries come from tool calls (including the default tool-based structured output mode), which were redacted correctly.

Remediation

Upgrade to a patched version; retry prompt content now honors include_content=False like all other message content. If you rely on this setting, consider reviewing previously exported traces for retry prompt content that should not have been recorded.

Workaround for Unpatched Versions

If you cannot upgrade, scrub or drop the message attributes (gen_ai.input.messages, gen_ai.output.messages, pydantic_ai.all_messages) in your telemetry pipeline (for example with an OpenTelemetry Collector processor), or use tool-based structured output modes, whose retry feedback honors include_content=False.

Credits

Reported privately by the University of Sydney Security Research Team (Liyi Zhou, Ziyue Wang, Strick, Maurice, Chenchen Yu), and later independently discovered and reported publicly, with a fix, by @sean-kim05.

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIpydantic-ai≥ 0.3.4&&< 1.107.41.107.4pip install --upgrade 'pydantic-ai==1.107.4'
🐍PyPIpydantic-ai≥ 2.0.0b1&&< 2.27.12.27.1pip install --upgrade 'pydantic-ai==2.27.1'
🐍PyPIpydantic-ai-slim≥ 0.3.4&&< 1.107.41.107.4pip install --upgrade 'pydantic-ai-slim==1.107.4'
🐍PyPIpydantic-ai-slim≥ 2.0.0b1&&< 2.27.12.27.1pip install --upgrade 'pydantic-ai-slim==2.27.1'

Affected Products

1 product · 2 configurations
Application
pydantic aipydantic
≥ 2.0.0 && < 2.27.1
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for pydantic-ai, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update pydantic-ai to 1.107.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-107293 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

A moderate information disclosure vulnerability was found in the pydantic-ai Python agent framework, as shipped in Red Hat Enterprise Linux AI and Lightspeed Core. When pydantic-ai's OpenTelemetry instrumentation is configured with InstrumentationSettings(include_content=False) to suppress message content, retry…

Workaround published by Red Hat
Until the deferred fix is delivered, the exposure can be reduced by scrubbing or dropping the message attributes gen_ai.input.messages, gen_ai.output.messages, and pydantic_ai.all_messages in the telemetry pipeline, for example with an OpenTelemetry Collector processor, or by switching agents to tool-based structured output modes, whose retry feedback is correctly redacted when include_content=False. Previously exported traces can also be reviewed for retry prompt content that should not have been recorded. Upgrading pydantic-ai to a version containing the upstream fix (1.107.4 for the 1.x series or 2.27.1 for the 2.x series) resolves the issue.
Source: Red Hat security advisory for CVE-2026-107293 (CC BY 4.0)

Frequently Asked Questions

### Summary Pydantic AI's OpenTelemetry instrumentation supports `InstrumentationSettings(include_content=False)` to exclude message content — user prompts, model completions, tool call arguments and responses — from exported telemetry, so that agents can be monitored without sending sensitive content to the observability backend. Retry prompts — the feedback messages Pydantic AI sends back to the model when its output fails validation or an output validator raises `ModelRetry` — were not covered by this setting when they were not associated with a tool call, as with structured output modes
O3 Security · Impact-Aware SCA

Is CVE-2026-107293 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2026-107293: pydantic-ai — Fixed in 1.107.4