chore(deps): update dependency langchain-core to v1 [security]#163
Open
renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
Open
chore(deps): update dependency langchain-core to v1 [security]#163renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
Conversation
|
/gcbrun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
>=0.1.1, <1.0.0→>=1.2.11, <1.2.12==0.3.81→==1.2.11GitHub Vulnerability Alerts
CVE-2026-26013
Server-Side Request Forgery (SSRF) in ChatOpenAI Image Token Counting
Summary
The
ChatOpenAI.get_num_tokens_from_messages()method fetches arbitraryimage_urlvalues without validation when computing token counts for vision-enabled models. This allows attackers to trigger Server-Side Request Forgery (SSRF) attacks by providing malicious image URLs in user input.Severity
Low - The vulnerability allows SSRF attacks but has limited impact due to:
Impact
An attacker who can control image URLs passed to
get_num_tokens_from_messages()can:Note: This vulnerability occurs during token counting, which may happen outside of model invocation (e.g., in logging, metrics, or token budgeting flows).
Details
The vulnerable code path:
get_num_tokens_from_messages()processes messages containingimage_urlcontent blocksdetail: "low", it calls_url_to_size()to fetch the image and compute token counts_url_to_size()performshttpx.get(image_source)on any URL without validationFile:
libs/partners/openai/langchain_openai/chat_models/base.pyPatches
The vulnerability has been patched in
langchain-openai==1.1.9(requireslangchain-core==1.2.11).The patch adds:
langchain_core._security._ssrf_protection.validate_safe_url()to block:httpx.getdefault)allow_fetching_images=FalseparameterWorkarounds
If you cannot upgrade immediately:
image_urlvalues before passing messages to token counting or model invocationRelease Notes
langchain-ai/langchain (langchain-core)
v0.1.16Compare Source
What's Changed
_load_sql_databse_chainby @B-Step62 in #19908New Contributors
Full Changelog: langchain-ai/langchain@v0.1.15...v0.1.16
v0.1.15Compare Source
What's Changed
afrom_texts&afrom_embeddingsby @crispyricepc in #20009LocalFileStoreto allow directory/file permissions to be specified by @chrispy-snps in #18857graphsupdate by @leo-gan in #19675integrations/providersupdate 10 by @leo-gan in #19970integrations/providers/unstructuredupdate by @leo-gan in #19892integrations/providersupdate 9 by @leo-gan in #19941cross_encodersflatten namespaces by @leo-gan in #20183ElasticsearchStore.BM25RetrievalStrategyby @g-votte in #20098New Contributors
Full Changelog: langchain-ai/langchain@v0.1.14...v0.1.15
v0.1.14Compare Source
What's Changed
by @efriis in #19452
api_docs_cleanfix by @leo-gan in #19405partitionparameter to DashVector by @wangcailin in #19385pipeandpickmethods (docs only) by @liugddx in #19395DuckDBas a vectorstore by @Hugoberry in #18916HuggingFacePipelineby @nikhilkmr300 in #19306Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.