Refacto Agents

Industry story

Pydantic AI v1.107.4 patches two security vulnerabilities

agent-framework guardrails security tool-use

The more serious of the two bugs in Pydantic AI v1.107.4 is worth a close look before you upgrade and move on. A missing CORS preflight check on the dev web chat UI meant any malicious site open in a developer's browser could silently trigger the agent, run its tools, and do so with the full credentials of the local process. The fix is a Content-Type: application/json header requirement, which is thin protection for something that could have exfiltrated secrets or hit production systems. Both the high-severity CORS issue and a lower-severity content-redaction leak are patched across the v1 and v2 lines.

Full analysis

Pydantic AI released v1.107.4 (backporting fixes to the v1 line) addressing two security vulnerabilities in the framework. The higher-severity issue (GHSA-h4xc-3qfq-jf93, rated high) allowed cross-origin requests to reach the development web chat UI's chat endpoint without a CORS preflight check, meaning a malicious website open in a developer's browser could silently trigger the agent to run and execute its tools using the local process's privileges and credentials. The fix requires requests to include a Content-Type: application/json header. A second low-severity fix (GHSA-3gh4-cghq-f8v4) ensures retry-prompt content is properly redacted when instrumentation is configured to exclude content. Both fixes are also patched in the v2 line (versions 2.28.0 and 2.27.1 respectively).

Comments