Skip to content

← Actionable
Low, CVSS 2.3amended

Pydantic AI OpenTelemetry instrumentation: exception events on tool and agent run spans include content when include_content=False

CVE-2026-107291GHSA-4x9p-g9wm-8q7f

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (pydantic-ai 2.44.0, 1.107.6; pydantic-ai-slim 2.44.0, 1.107.6), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI pydantic-ai

    Affected
    >= 0.3.4, < 1.107.6>= 2.0.0b1, < 2.44.0
    Fixed in
    1.107.6, 2.44.0
  • PyPI pydantic-ai-slim

    Affected
    >= 0.3.4, < 1.107.6>= 2.0.0b1, < 2.44.0
    Fixed in
    1.107.6, 2.44.0

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
2.3 · 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 source
EPSS
  • CVE-2026-107291: 0.62% estimated exploitation activity in the next 30 days; percentile 49.86 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary Pydantic AI's OpenTelemetry instrumentation supports InstrumentationSettings(includecontent=False) to exclude message content — user prompts, model completions, tool call arguments and responses, and any other message content — from exported telemetry, so that agents can be monitored without sending sensitive content to the observability backend. The message attributes honoured the setting. Several other parts of the same spans did not, and exported content regardless of it: - Exceptions. Recorded as OpenTelemetry exception events, with their message and stack trace, on tool, agent run, model request, embedding and image generation spans, and on realtime session spans. The message of the exception carrying a tool's ModelRetry or ToolFailed feedback is the text sent back to the model, which can quote tool arguments and results. When a tool ran out of retries, the error that ended the run was chained from the last retry, so its stack trace repeated that text on the run span.…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 4 · amended ·

    Amended from ghsa record GHSA-4x9p-g9wm-8q7f

  2. Revision 3 · amended ·

    Reviewed OSV alias/range/CVSS4 correction; package source scopes and original publication preserved. No customer finding resolved.

  3. Revision 2 · amended ·

    Amended from osv record GHSA-4x9p-g9wm-8q7f

  4. Revision 1 · created ·

    Published from ghsa record GHSA-4x9p-g9wm-8q7f

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-107291

Advisory: Pydantic AI OpenTelemetry instrumentation: exception events on tool and agent run spans include content when `include_content=False`
IDs: CVE-2026-107291, GHSA-4x9p-g9wm-8q7f
Record: https://patchnext.com/advisories/cve-2026-107291 (revision 4, source checked 26 Oct 2026, 13:55 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Low (CVSS 2.3)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: pydantic-ai 2.44.0, 1.107.6; pydantic-ai-slim 2.44.0, 1.107.6. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI pydantic-ai: affected >= 0.3.4, < 1.107.6; >= 2.0.0b1, < 2.44.0; fixed in 1.107.6, 2.44.0
- PyPI pydantic-ai-slim: affected >= 0.3.4, < 1.107.6; >= 2.0.0b1, < 2.44.0; fixed in 1.107.6, 2.44.0

## Suggested inspection (read-only)
- `python -m pip show pydantic-ai`: prints the installed version. Run with the environment that serves production active.
- `python -m pip show pydantic-ai-slim`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on pydantic-ai, pydantic-ai-slim.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-4x9p-g9wm-8q7f (GitHub-reviewed advisory GHSA-4x9p-g9wm-8q7f lists affected ranges: PyPI pydantic-ai >=0.3.4 =2.0.0b1 =0.3.4 =2.0.0b1 <2.44.0)
- Verified: https://osv.dev/vulnerability/GHSA-4x9p-g9wm-8q7f (OSV record GHSA-4x9p-g9wm-8q7f lists affected ranges: PyPI pydantic-ai >=0.3.4 =2.0.0b1 =0.3.4 =2.0.0b1 <2.44.0 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…