Repository navigation
Closed
Labels
scope/aiAI review pipeline, personas, prompts, LLM client, or RAGscope/securitySecurity linters (trivy, bandit, gitleaks, kubeconform) and Vaultsource/agentFiled by an agenttype/securityType security: a vulnerability or a leak
Milestone
Description
Problem
pyproject.toml pins pydantic-ai==2.35.0, and uv.lock locks pydantic-ai, pydantic-ai-slim and pydantic-evals at 2.35.0. Three advisories published against that version make uv audit, and with it uv run devops ci and the pre-push gate, fail on every branch, including release/v0.2.29 at 55c235e:
- GHSA-4x9p-g9wm-8q7f: OpenTelemetry instrumentation includes content in exception events on tool and agent run spans when
include_content=False. - GHSA-fpf4-vwcp-v4hp: quadratic title extraction in
web_fetchblocks the event loop. - GHSA-vmxc-h2x2-jmf3: the SSRF cloud-metadata blocklist can be bypassed with IPv6 zone identifiers.
All three are fixed in 2.44.0 (and 1.107.6). The latest release is 2.54.0 (2026-10-03).
Proposed remedy
Pin pydantic-ai==2.54.0, the latest 2.x, and relock the pydantic-ai packages with uv lock --upgrade-package. #1001 moves the model layer onto pydantic-ai, so the current release is the one to build on. Fix any API changes the upgrade surfaces, without adding shims.
Acceptance criteria
-
uv auditreports no pydantic-ai advisory, anduv run devops cipasses. -
pyproject.tomlanduv.lockagree, and only the pydantic-ai family and the packages they require change in the lock. -
changelog.d/<n>.mdrecords the upgrade under### Security.
Opened as a borrow (#1153, budget/borrowed): a security fix that blocks the release gate.
Update 2026-10-08: delivered scope
pydantic-ai==2.54.0. The lock moves pydantic-ai, pydantic-ai-slim, pydantic-evals and pydantic-graph to 2.54.0, and the resolver requires anthropic 1.12.1, openai 3.26.1 and google-genai 2.29.0. Nothing else in the lock changes.uv auditreports no advisory anduv run devops cipasses.- 2.44.0, the first fixed release, already removed
pydantic_ai._costand broke the same private imports, so no fixed version avoided the migration; the latest was taken. - The private pydantic-ai imports that 2.54.0 broke now use public APIs: genai-prices pricing, the
pydantic_ai.durable_execengine builder forLocalDurabilityCapability,pydantic_ai.runfor the enqueue types, and OpenTelemetry's propagator for the traceparent. Unused re-exports of pydantic-ai internals and the_is_call_ctxmonkey-patch are removed. TheDeferredToolRequests.build_resultsoverride acceptsMappingapprovals. - Left for refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001:
pydantic_ai._ssrfincore/validation.pyandhttp/egress.py, because pydantic-ai has no public SSRF classifier, andresolve_model_id_syncreading the durable base's_models_by_id. Both are listed in the task file and noted on refactor(ai): one model seam: llmclient over three wire adapters behind one factory, no second provider stack #1001. - Behaviour changes that come with the library: the local durability engine's event handler must be async, an agent holds at most one durability capability, and tool contexts must be annotated with pydantic-ai's
RunContext.
Metadata
Metadata
Assignees
Labels
scope/aiAI review pipeline, personas, prompts, LLM client, or RAGscope/securitySecurity linters (trivy, bandit, gitleaks, kubeconform) and Vaultsource/agentFiled by an agenttype/securityType security: a vulnerability or a leak
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 8, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
Three security advisories block the CI and pre-push gate on every branch, including the active release branch, making this a release-blocking security fix.The advisory GHSA-4x9p-g9wm-8q7f does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 on the board.Unblocks the entire CI/release pipeline and eliminates three known vulnerabilities (data leakage, DoS, SSRF bypass) in a shipped dependency.Upgrading from 2.35.0 to 2.54.0 spans many minor versions and may surface API changes that need fixing, but the target version and scope are well-defined.dan-petty commentedon Oct 8, 2026
Placed in v0.2.29 under the owner's 2026-10-08 instruction to pull every issue that blocks the roadmap Service into the current release: since these advisories were published,
uv auditfailsdevops ci, the pre-push gate and CI's Static Analysis on every branch, so no remaining v0.2.29 fix (#1400, #1360) can be pushed or merged until this lands. Please keep it in v0.2.29.fix(security): upgrade pydantic-ai to 2.54.0, past three advisories t…
dan-petty-bot commentedon Oct 8, 2026
What changed
#1447, merged into
release/v0.2.29as 327964d.21 file(s) changed.
How it was verified
Check runs at 4db2da6:
Acceptance Criteria of
docs/agent/tasks/task-1446-pydantic-ai-advisories.md:uv auditreports no pydantic-ai advisory, anduv run devops cipasses.pyproject.tomlanduv.lockagree. The lock changes only the four pydantic-ai packages and the anthropic, openai and google-genai versions the resolver requires.changelog.d/1446.mdrecords the upgrade under### Security, with the API changes under### Changedand### Removed.CHANGELOG.mdanddocs/ROADMAP.mdare untouched.srcare the twopydantic_ai._ssrfimports listed above. There are no version checks,ImportErrorfallbacks or copied internals.tests/test_pydantic_ai_durable.pyimportsBaseDurabilityCapabilityfrompydantic_ai.durable_exec.test_local_durability_delivers_run_events_and_leaves_toolsets_unwrappedreplaces the test that called the private_dispatch_event_stream_eventand_wrap_leaf_toolset. It runs an agent onTestModeland checks that the async handler receives the tool call and result events, thatget_wrapper_toolsetleaves every toolset unwrapped, and that the steps are recorded.StepPersistenceas its extra capability, since a second engine is refused.RunContext.test_get_active_traceparentpins the traceparent of a known span context and None outside a span.libraries/pydantic_ai.md,python_packages.md) name 2.54.0, anduv run devops docs generate --sync-readmeleaves the generated docs unchanged.feat(release): v0.2.29 (#1455)