Server-side Request Forgery (SSRF)pydantic-ai-slim is an Agent Framework / shim to use Pydantic with LLMs, slim package
Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) through the web_fetch_tool process. An attacker can access restricted hosts by supplying a hostname that is normalized differently by the resolver, bypassing domain restrictions.
How to fix Server-side Request Forgery (SSRF)? Upgrade pydantic-ai-slim to version 1.107.6, 2.44.0 or higher.
| [1.77.0,1.107.6)[2.0.0b1,2.44.0) |
Missing Release of Resource after Effective Lifetimepydantic-ai-slim is an Agent Framework / shim to use Pydantic with LLMs, slim package
Affected versions of this package are vulnerable to Missing Release of Resource after Effective Lifetime via ConcurrencyLimitedModel when streaming model responses. A RuntimeError is raised and a concurrency slot is leaked when a streamed response is iterated and closed on a different task than the one that acquired the slot, because the underlying anyio.CapacityLimiter ties each slot to the acquiring task. This causes the limiter to become permanently exhausted, blocking all subsequent agent runs that share the same ConcurrencyLimiter and effectively crashing the application's concurrency management.
How to fix Missing Release of Resource after Effective Lifetime? Upgrade pydantic-ai-slim to version 2.53.0 or higher.
| |
Inefficient Algorithmic Complexitypydantic-ai-slim is an Agent Framework / shim to use Pydantic with LLMs, slim package
Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via the _convert_html function in web_fetch.py, where processing a deeply nested or adversarially structured HTML document causes unbounded HTML-to-Markdown conversion cost. An attacker who controls a web page fetched via the web_fetch tool can serve HTML with deeply nested elements (such as <dd> or list items) that cause the markdownify-based converter to produce enormous intermediate strings, holding the GIL for seconds and crashing the process.
How to fix Inefficient Algorithmic Complexity? Upgrade pydantic-ai-slim to version 2.52.0, 1.107.7 or higher.
| [2.0.0b1,2.52.0)[1.77.0,1.107.7) |
Regular Expression Denial of Service (ReDoS)pydantic-ai-slim is an Agent Framework / shim to use Pydantic with LLMs, slim package
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the web_fetch tool in pydantic_ai/common_tools/web_fetch.py, where response body decoding is performed synchronously on the event loop using response.text. A server returning a response with a charset that maps to a slow or non-text codec (such as rot_13 or base64_codec) can block the event loop for an extended period, crashing the affected agent run. Additionally, a deeply nested JSON document can trigger a RecursionError during parsing, and certain HTML responses can cause quadratic work during title extraction and HTML-to-markdown conversion, all of which crash the run.
How to fix Regular Expression Denial of Service (ReDoS)? Upgrade pydantic-ai-slim to version 2.44.0, 1.107.6 or higher.
| [2.0.0b1,2.44.0)[1.77.0,1.107.6) |
Improper Validation of Unsafe Equivalence in Inputpydantic-ai-slim is an Agent Framework / shim to use Pydantic with LLMs, slim package
Affected versions of this package are vulnerable to Improper Validation of Unsafe Equivalence in Input via IPv6 zone identifier handling in the _ssrf.py SSRF guard functions is_cloud_metadata_ip and is_private_ip. An attacker can supply an IPv6 address literal carrying a zone identifier (e.g. fd00:ec2::254%251) to bypass the blocklist checks, because Python's ipaddress module folds the zone identifier into address equality and hashing, causing the guarded address to compare unequal to the blocked entry. This allows requests to cloud metadata endpoints or private network addresses that should be denied.
Note: This is only exploitable if the application passes URLs that are, or could be, influenced by untrusted input into local network access.
How to fix Improper Validation of Unsafe Equivalence in Input? Upgrade pydantic-ai-slim to version 2.44.0, 1.107.6 or higher.
| [2.0.0b1,2.44.0)[1.56.0,1.107.6) |
Insertion of Sensitive Information into Log Filepydantic-ai-slim is an Agent Framework / shim to use Pydantic with LLMs, slim package
Affected versions of this package are vulnerable to Insertion of Sensitive Information into Log File via the OpenTelemetry instrumentation layer, specifically in record_exception and related span-recording helpers, when the include_content setting is disabled. Exception events recorded on model request spans and realtime spans include the full exception message and stack trace, which can contain content the setting is intended to withhold - such as tool retry payloads, model request/response echoes, validation error arguments, and user-supplied data. An authenticated attacker with access to the exported trace data can read sensitive content that should have been suppressed.
How to fix Insertion of Sensitive Information into Log File? Upgrade pydantic-ai-slim to version 1.107.6, 2.44.0 or higher.
| [0.3.4,1.107.6)[2.0.0b1,2.44.0) |