Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-107293 Overview
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. CVE-2026-107293 is an information exposure vulnerability [CWE-212] affecting Pydantic AI versions from 0.3.4 through 1.107.4 and 2.27.1. When OpenTelemetry instrumentation is configured with InstrumentationSettings(include_content=False), the framework still exports retry prompts outside tool calls into gen_ai.input.messages and pydantic_ai.all_messages. Agents using NativeOutput, PromptedOutput, or output validators on text output can disclose validation feedback, including invalid model values quoted by that feedback, to anyone with access to the telemetry backend. The maintainers fixed the issue in versions 1.107.4 and 2.27.1.
Critical Impact
Telemetry backends receive sensitive validation feedback and model-generated content that operators explicitly opted out of exporting by setting include_content=False.
Affected Products
- Pydantic AI versions 0.3.4 through 1.107.3
- Pydantic AI versions 2.0.0 through 2.27.0
- Deployments configured with InstrumentationSettings(include_content=False) using NativeOutput, PromptedOutput, or text output validators
Discovery Timeline
- 2026-10-08 - CVE-2026-107293 published to NVD
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-107293
Vulnerability Analysis
The flaw is an information exposure through sensitive data [CWE-212]. Operators disable content export in telemetry by passing include_content=False to InstrumentationSettings. This flag is intended to prevent model inputs and outputs from reaching OpenTelemetry collectors and downstream backends. The otel_message_parts method on RetryPromptPart did not honor that flag when the retry prompt was not associated with a tool call. As a result, retry prompts emitted by NativeOutput, PromptedOutput, or output validators were written into the gen_ai.input.messages and pydantic_ai.all_messages span attributes. These retry prompts frequently quote the invalid model response verbatim, exposing user data the operator attempted to redact.
Root Cause
The RetryPromptPart.otel_message_parts serializer unconditionally included the retry text content when tool_name was None. The method did not check settings.include_content on that code path. Tool-call retries used a separate branch that correctly respected the setting.
Attack Vector
This issue is not remotely exploitable in the traditional sense. Exposure occurs whenever a vulnerable agent runs with instrumentation enabled and a reader has access to the telemetry backend. Any party with query access to the spans, including internal staff, third-party observability vendors, or an attacker who has compromised the backend, can read redacted content that should have been suppressed.
# Security patch in pydantic_ai_slim/pydantic_ai/messages.py
# Gate RetryPromptPart OpenTelemetry content on include_content (#7357)
def otel_message_parts(self, settings: InstrumentationSettings) -> list[_otel_messages.MessagePart]:
if self.tool_name is None:
return [
_otel_messages.TextPart(
type='text', **({'content': self.model_response()} if settings.include_content else {})
)
]
else:
part = _otel_messages.ToolCallResponsePart(
type='tool_call_response',
Source: GitHub Commit fe9dbed
Detection Methods for CVE-2026-107293
Indicators of Compromise
- Presence of retry prompt text inside gen_ai.input.messages or pydantic_ai.all_messages span attributes despite include_content=False being set in InstrumentationSettings.
- Telemetry spans emitted by agents using NativeOutput, PromptedOutput, or text output validators containing quoted invalid model responses.
Detection Strategies
- Query the observability backend for span attributes gen_ai.input.messages and pydantic_ai.all_messages containing retry prompt text patterns such as validation error messages.
- Inventory installed Pydantic AI versions across Python environments and flag any build between 0.3.4 and the fixed releases 1.107.4 or 2.27.1.
- Review application configuration to identify agents that combine InstrumentationSettings(include_content=False) with NativeOutput, PromptedOutput, or text validators.
Monitoring Recommendations
- Alert on new telemetry records that include retry prompt payloads from agents configured for redaction.
- Audit who can read span data in the telemetry backend and record access to the affected attribute keys.
- Track dependency updates in software bill of materials (SBOM) tooling to ensure patched Pydantic AI versions propagate across services.
How to Mitigate CVE-2026-107293
Immediate Actions Required
- Upgrade Pydantic AI to version 1.107.4 on the 1.x branch or 2.27.1 on the 2.x branch.
- Rotate or purge historical telemetry data that may contain leaked validation feedback or quoted model values.
- Review access control lists on the OpenTelemetry collector and downstream storage to limit exposure of previously exported spans.
Patch Information
The fix is tracked in GitHub Pull Request #7357 and committed as fe9dbed7b7ccf7e7128b5786886e4441f6f5594f. Release notes are available at Pydantic AI v2.27.1 and the coordinated advisory is published as GHSA-3gh4-cghq-f8v4.
Workarounds
- Disable OpenTelemetry instrumentation on affected agents until the upgrade is deployed.
- Replace NativeOutput, PromptedOutput, and text output validators with tool-call based outputs, which are not affected by this code path.
- Strip or redact gen_ai.input.messages and pydantic_ai.all_messages attributes at the OpenTelemetry collector using an attribute processor.
# OpenTelemetry Collector processor to redact affected attributes
processors:
attributes/redact_pydantic_ai:
actions:
- key: gen_ai.input.messages
action: delete
- key: pydantic_ai.all_messages
action: delete
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

