pydantic-ai@2.0.0b5

AI Agent Framework, the Pydantic way

  • latest version

    2.55.0

  • latest non vulnerable version

  • first published

    2 years ago

  • latest version published

    1 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the pydantic-ai package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • L
    Insertion of Sensitive Information into Log File

    pydantic-ai is an AI Agent Framework, the Pydantic way

    Affected versions of this package are vulnerable to Insertion of Sensitive Information into Log File via the otel_message_parts method in messages.py, where RetryPromptPart content is included in OpenTelemetry traces regardless of the include_content instrumentation setting. An authenticated attacker with access to the telemetry/tracing backend can read message content that was intended to be suppressed by the include_content flag.

    How to fix Insertion of Sensitive Information into Log File?

    Upgrade pydantic-ai to version 1.107.4, 2.27.1 or higher.

    [0.3.4,1.107.4)[2.0.0b1,2.27.1)
    • L
    Insertion of Sensitive Information into Log File

    pydantic-ai is an AI Agent Framework, the Pydantic way

    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 to version 1.107.6, 2.44.0 or higher.

    [0.3.4,1.107.6)[2.0.0b1,2.44.0)
    • H
    Cross-site Request Forgery (CSRF)

    pydantic-ai is an AI Agent Framework, the Pydantic way

    Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) via the post_chat handler in pydantic_ai/ui/_web/api.py, which does not enforce a Content-Type: application/json requirement on the web UI chat endpoint. Because browsers can send CORS-safelisted content types (text/plain, multipart/form-data, application/x-www-form-urlencoded) cross-origin without a preflight, a malicious page visited by a developer running the local web UI can issue a forged POST request to the /chat endpoint. This causes the served agent to execute a run - including any tools it exposes - on behalf of the victim without their knowledge or consent.

    How to fix Cross-site Request Forgery (CSRF)?

    Upgrade pydantic-ai to version 1.107.4, 2.28.0 or higher.

    [1.34.0,1.107.4)[2.0.0b1,2.28.0)