langchain-openai@1.1.6 vulnerabilities

An integration package connecting OpenAI and LangChain

  • latest version

    1.1.9

  • latest non vulnerable version

  • first published

    2 years ago

  • latest version published

    5 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the langchain-openai 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
    • M
    Server-side Request Forgery (SSRF)

    langchain-openai is an An integration package connecting OpenAI and LangChain

    Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the ChatOpenAI.get_num_tokens_from_messages() function. An attacker can cause the server to make internal network requests, though they cannot see the responses, by supplying crafted image_url values in user input. The vulnerable invocation of get_num_tokens_from_messages() happens during token counting, which may happen at several points in the application's execution that are out of the control of the attacker. Small disruptions may result from exploitation, due to unintended requests being sent.

    How to fix Server-side Request Forgery (SSRF)?

    Upgrade langchain-openai to version 1.1.9 or higher.

    [,1.1.9)