CVE-2026-107293: Pydantic AI OpenTelemetry instrumentation: retry prompt content is not redacted when `include_content=False`
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.
References
- github.com/advisories/GHSA-3gh4-cghq-f8v4
- github.com/pydantic/pydantic-ai/commit/fe9dbed7b7ccf7e7128b5786886e4441f6f5594f
- github.com/pydantic/pydantic-ai/pull/7357
- github.com/pydantic/pydantic-ai/releases/tag/v2.27.1
- github.com/pydantic/pydantic-ai/security/advisories/GHSA-3gh4-cghq-f8v4
- nvd.nist.gov/vuln/detail/CVE-2026-107293
Code Behaviors & Features
Detect and mitigate CVE-2026-107293 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →