Intel

AIKIDO-2026-716787

pydantic-ai-slim is vulnerable to Exposure of Sensitive Information

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Aug 5, 2026
August 5, 2026

42

CVE Score

Medium

Exposure of Sensitive Information

Are you affected? Scan for Free

TL;DR

The safe_download helper in the SSRF-protected download path forwards caller-supplied request headers, including Authorization, Cookie, and Proxy-Authorization, when following HTTP redirects. It decides whether to drop these sensitive headers by comparing only the redirect target hostname against the original hostname. A redirect that keeps the same hostname but changes the scheme or port is treated as same-origin, so credentials are forwarded to a different origin such as a plaintext http downgrade or a different port on the same host. The fix compares the full origin of scheme, host, and port and strips the sensitive headers on any cross-origin redirect except an http-to-https upgrade on the same host.

How do I fix this?

Upgrade the pydantic-ai-slim and/or the pydantic-ai library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application forwards sensitive headers such as Authorization or Cookie when downloading a URL whose redirect target can be externally influenced.

Versions

1.77.0 - 2.21.0

Fixed in 2.22.0

Background info

pydantic-ai-slim is vulnerable to Exposure of Sensitive Information in versions 1.77.0 - 2.21.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea