{"id":"CVE-2026-107293","aliases":["CVE-2026-107293","GHSA-3gh4-cghq-f8v4","PYSEC-2026-4274","PYSEC-2026-4283"],"related":[],"kind":"vulnerability","state":"published","title":"Pydantic AI OpenTelemetry instrumentation: retry prompt content is not redacted when `include_content=False`","summary":"Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 0.3.4 until 1.107.4 and 2.27.1, OpenTelemetry instrumentation configured with InstrumentationSettings(include_content=False) can export retry prompts outside tool calls in gen_ai.input.messages and pydantic_ai.all_messages. Agents using NativeOutput, PromptedOutput, or output validators on text output can therefore disclose validation feedback, including invalid model values quoted by that feedback, to readers of the telemetry backend. Tool-call retries and deployments that do not use include_content=False are not affected by this specific path. This issue is fixed in versions 1.107.4 and 2.27.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 0.3.4 until 1.107.4 and 2.27.1, OpenTelemetry instrumentation configured with InstrumentationSettings(include_content=False) can export retry prompts outside tool calls in gen_ai.input.messages and pydantic_ai.all_messages. Agents using NativeOutput, PromptedOutput, or output validators on text output can therefore disclose validation feedback, including invalid model values quoted by that feedback, to readers of the telemetry backend. Tool-call retries and deployments that do not use include_content=False are not affected by this specific path. This issue is fixed in versions 1.107.4 and 2.27.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nPydantic 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.\n\nRetry 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.\n\n### Details\n\nRetry 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.\n\n### Impact\n\nThis 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.\n\n### Who Is Affected\n\nYou 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.\n\n### Remediation\n\nUpgrade 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.\n\n### Workaround for Unpatched Versions\n\nIf 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`.\n\n### Credits\n\nReported 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.","format":"markdown","source":"ghsa"}],"published":"2026-10-08T16:57:24.841Z","modified":"2026-10-15T14:56:22.971Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":2.3,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":2.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"}],"cwes":["CWE-212","CWE-532"],"affected":[{"ranges":[{"version":">= 0.3.4, < 1.107.4","status":"affected"},{"version":">= 2.0.0b1, < 2.27.1","status":"affected"}],"vendor":"pydantic","product":"pydantic-ai","source":"cvelist"},{"ranges":[{"version":">= 0.3.4, < 1.107.4","status":"affected"},{"version":">= 2.0.0b1, < 2.27.1","status":"affected"}],"vendor":"pydantic","product":"pydantic-ai-slim","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.3.4","status":"affected","fixed":"1.107.4"}],"ecosystem":"PyPI","package":"pydantic-ai","purl":"pkg:pypi/pydantic-ai","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0b1","status":"affected","fixed":"2.27.1"}],"ecosystem":"PyPI","package":"pydantic-ai","purl":"pkg:pypi/pydantic-ai","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0.3.4","status":"affected","fixed":"1.107.4"}],"ecosystem":"PyPI","package":"pydantic-ai-slim","purl":"pkg:pypi/pydantic-ai-slim","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0b1","status":"affected","fixed":"2.27.1"}],"ecosystem":"PyPI","package":"pydantic-ai-slim","purl":"pkg:pypi/pydantic-ai-slim","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.3.4","fixed":"1.107.4"},{"status":"affected","introduced":"2.0.0","fixed":"2.27.1"}],"vendor":"pydantic","product":"pydantic_ai","cpe":"cpe:2.3:a:pydantic:pydantic_ai:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0.3.4","status":"affected","fixed":"1.107.4"},{"type":"ecosystem","introduced":"2.0.0b1","status":"affected","fixed":"2.27.1"}],"ecosystem":"PyPI","package":"pydantic-ai","purl":"pkg:pypi/pydantic-ai","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0.3.4","status":"affected","fixed":"1.107.4"},{"type":"ecosystem","introduced":"2.0.0b1","status":"affected","fixed":"2.27.1"}],"ecosystem":"PyPI","package":"pydantic-ai-slim","purl":"pkg:pypi/pydantic-ai-slim","source":"pysec"}],"references":[{"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-3gh4-cghq-f8v4","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/pull/7357","tags":["patch","vendor-advisory","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/commit/fe9dbed7b7ccf7e7128b5786886e4441f6f5594f","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/releases/tag/v2.27.1","tags":["patch","release-notes","vendor-advisory","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/pydantic-ai","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-3gh4-cghq-f8v4","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-107293","tags":["advisory"],"sources":["pysec"]},{"url":"https://pypi.org/project/pydantic-ai-slim","tags":["package"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-08T17:14:19.566Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-107293","url":"https://www.cve.org/CVERecord?id=CVE-2026-107293","licence":"CVE Terms of Use","modified":"2026-10-08T17:14:30.659Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3gh4-cghq-f8v4","url":"https://github.com/advisories/GHSA-3gh4-cghq-f8v4","licence":"CC-BY-4.0","modified":"2026-10-15T14:56:22.971Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-107293","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-107293","licence":"Public domain","modified":"2026-10-13T14:30:39.803Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4274","url":"https://osv.dev/vulnerability/PYSEC-2026-4274","licence":"CC-BY-4.0","modified":"2026-10-15T14:56:22.971Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4283","url":"https://osv.dev/vulnerability/PYSEC-2026-4283","licence":"CC-BY-4.0","modified":"2026-10-15T14:56:22.971Z"}],"updatedAt":"2026-11-25T22:59:43.188Z","epss":{"score":0.00297,"percentile":0.24009,"date":"2026-12-02T12:00:21.000Z"}}