Skip to content

chore(deps): bump langchain-openai to 1.1.14 (SSRF advisory)#421

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
chore/langchain-openai-1.1.14
May 12, 2026
Merged

chore(deps): bump langchain-openai to 1.1.14 (SSRF advisory)#421
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
chore/langchain-openai-1.1.14

Conversation

@starfolkai
Copy link
Copy Markdown
Contributor

@starfolkai starfolkai Bot commented May 12, 2026

Summary

  • Bumps langchain-openai from 1.1.13 to 1.1.14 in the test-langchain dependency 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 separate httpx.get with 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.
  • Practical impact for callers of this SDK is limited (the response body is passed straight to Pillow and never surfaced), but the pin should still move forward.
  • py/uv.lock refreshed via uv lock.

Test plan

  • uv lock --check — clean
  • Langchain integration tests pass on latest with langchain-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)
  • Verified the patched _url_to_size source uses _get_ssrf_safe_client() rather than the old validate-then-fetch pattern
  • CI matrix: test_langchain(latest) and test_langchain(0.3.28)

🤖 Generated with Claude Code

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>
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit a9a6cfb into main May 12, 2026
82 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the chore/langchain-openai-1.1.14 branch May 12, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant