chore(deps): bump langchain-openai to 1.1.14 (SSRF advisory)#421
Merged
Merged
Conversation
The 1.1.13 pin in the test-langchain dependency group was below the patched 1.1.14, which fixes a validate-then-fetch TOCTOU / DNS rebinding window in _url_to_size() (used by the OpenAI image-token counter). The practical impact is limited to blind probing — the response body is never returned to the caller — but the pin should still move forward. Confirmed langchain integration tests pass on latest with the new pin (uv.lock refreshed; cassettes replay cleanly). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Abhijeet Prasad (AbhiPrasad)
approved these changes
May 12, 2026
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.
Summary
langchain-openaifrom1.1.13to1.1.14in thetest-langchaindependency group to address an SSRF / DNS-rebinding advisory in_url_to_size()(used by the OpenAI image-token counter). The pre-1.1.14 code validated the URL and then performed a separatehttpx.getwith independent DNS resolution, opening a TOCTOU window. 1.1.14 replaces this with an SSRF-safe transport that pins the connection to the validated IP.py/uv.lockrefreshed viauv lock.Test plan
uv lock --check— cleanlatestwithlangchain-openai==1.1.14:pytest src/braintrust/integrations/langchain/test_callbacks.py test_context.py test_anthropic.py→ 16 passed, 1 skipped (cassettes replay; no re-recording needed)_url_to_sizesource uses_get_ssrf_safe_client()rather than the old validate-then-fetch patterntest_langchain(latest)andtest_langchain(0.3.28)🤖 Generated with Claude Code