Skip to content

chore(deps): update dependency langchain-openai to v1.1.14 [security] - #2597

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pypi-langchain-openai-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pypi-langchain-openai-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
langchain-openai (changelog) 1.1.10 → 1.1.14 age adoption passing confidence

langchain-openai: Image token counting SSRF protection can be bypassed via DNS rebinding

CVE-2026-41488 / GHSA-r7w7-9xr2-qq2r

More information

Details

Summary

langchain-openai's _url_to_size() helper (used by get_num_tokens_from_messages for image token counting) validated URLs for SSRF protection and then fetched them in a separate network operation with independent DNS resolution. This left a TOCTOU / DNS rebinding window: an attacker-controlled hostname could resolve to a public IP during validation and then to a private/localhost IP during the actual fetch.

The practical impact is limited because the fetched response body is passed directly to Pillow's Image.open() to extract dimensions — the response content is never returned, logged, or otherwise exposed to the caller. An attacker cannot exfiltrate data from internal services through this path. A potential risk is blind probing (inferring whether an internal host/port is open based on timing or error behavior).

Affected versions
  • langchain-openai < 1.1.14
Patched versions
  • langchain-openai >= 1.1.14 (requires langchain-core >= 1.2.31)
Affected code

File: libs/partners/openai/langchain_openai/chat_models/base.py — _url_to_size()

The vulnerable pattern was a validate-then-fetch with separate DNS resolution:

validate_safe_url(image_source, allow_private=False, allow_http=True)

##### ... separate network operation with independent DNS resolution ...
response = httpx.get(image_source, timeout=timeout)
Fix

The fix replaces the validate-then-fetch pattern with an SSRF-safe httpx transport (SSRFSafeSyncTransport from langchain-core) that:

  • Resolves DNS once and validates all returned IPs against a policy (private ranges, cloud metadata, localhost, k8s internal DNS)
  • Pins the connection to the validated IP, eliminating the DNS rebinding window
  • Disables redirect following to prevent redirect-based SSRF bypasses

This fix was released in langchain-openai 1.1.14.

Severity

  • CVSS Score: 3.1 / 10 (Low)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


langchain-openai: Image token counting SSRF protection can be bypassed via DNS rebinding

CVE-2026-41488 / GHSA-r7w7-9xr2-qq2r / PYSEC-2026-76

More information

Details

Summary

langchain-openai's _url_to_size() helper (used by get_num_tokens_from_messages for image token counting) validated URLs for SSRF protection and then fetched them in a separate network operation with independent DNS resolution. This left a TOCTOU / DNS rebinding window: an attacker-controlled hostname could resolve to a public IP during validation and then to a private/localhost IP during the actual fetch.

The practical impact is limited because the fetched response body is passed directly to Pillow's Image.open() to extract dimensions — the response content is never returned, logged, or otherwise exposed to the caller. An attacker cannot exfiltrate data from internal services through this path. A potential risk is blind probing (inferring whether an internal host/port is open based on timing or error behavior).

Affected versions
  • langchain-openai < 1.1.14
Patched versions
  • langchain-openai >= 1.1.14 (requires langchain-core >= 1.2.31)
Affected code

File: libs/partners/openai/langchain_openai/chat_models/base.py — _url_to_size()

The vulnerable pattern was a validate-then-fetch with separate DNS resolution:

validate_safe_url(image_source, allow_private=False, allow_http=True)

##### ... separate network operation with independent DNS resolution ...
response = httpx.get(image_source, timeout=timeout)
Fix

The fix replaces the validate-then-fetch pattern with an SSRF-safe httpx transport (SSRFSafeSyncTransport from langchain-core) that:

  • Resolves DNS once and validates all returned IPs against a policy (private ranges, cloud metadata, localhost, k8s internal DNS)
  • Pins the connection to the validated IP, eliminating the DNS rebinding window
  • Disables redirect following to prevent redirect-based SSRF bypasses

This fix was released in langchain-openai 1.1.14.

Severity

  • CVSS Score: 3.1 / 10 (Low)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


CVE-2026-41488 / GHSA-r7w7-9xr2-qq2r / PYSEC-2026-76

More information

Details

LangChain is a framework for building agents and LLM-powered applications. Prior to 1.1.14, langchain-openai's _url_to_size() helper (used by get_num_tokens_from_messages for image token counting) validated URLs for SSRF protection and then fetched them in a separate network operation with independent DNS resolution. This left a TOCTOU / DNS rebinding window: an attacker-controlled hostname could resolve to a public IP during validation and then to a private/localhost IP during the actual fetch.

Severity

  • CVSS Score: 3.1 / 10 (Low)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N

References

This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from 70d090d to 65857ee Compare July 19, 2026 04:15
@renovate renovate Bot changed the title chore(deps): update dependency langchain-openai to v1.1.14 [security] chore(deps): update dependency langchain-openai to v1.1.14 [security] - autoclosed Jul 29, 2026
@renovate renovate Bot closed this Jul 29, 2026
@renovate
renovate Bot deleted the renovate/pypi-langchain-openai-vulnerability branch July 29, 2026 05:05
@renovate renovate Bot changed the title chore(deps): update dependency langchain-openai to v1.1.14 [security] - autoclosed chore(deps): update dependency langchain-openai to v1.1.14 [security] Jul 30, 2026
@renovate renovate Bot reopened this Jul 30, 2026
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from fd071cd to 65857ee Compare July 30, 2026 16:50
@github-project-automation github-project-automation Bot moved this from Done to Dev backlog in Agent Stack Jul 30, 2026
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from 65857ee to fd071cd Compare July 30, 2026 16:50
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from fd071cd to 286cb4b Compare August 12, 2026 03:36
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from 286cb4b to efd4224 Compare August 26, 2026 16:15
@renovate renovate Bot changed the title chore(deps): update dependency langchain-openai to v1.1.14 [security] chore(deps): update dependency langchain-openai to v1.1.14 [security] - autoclosed Sep 3, 2026
@renovate renovate Bot closed this Sep 3, 2026
@github-project-automation github-project-automation Bot moved this from Dev backlog to Done in Agent Stack Sep 3, 2026
@renovate renovate Bot changed the title chore(deps): update dependency langchain-openai to v1.1.14 [security] - autoclosed chore(deps): update dependency langchain-openai to v1.1.14 [security] Sep 3, 2026
@renovate renovate Bot reopened this Sep 3, 2026
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch 2 times, most recently from efd4224 to 99d3000 Compare September 3, 2026 16:49
@github-project-automation github-project-automation Bot moved this from Done to Dev backlog in Agent Stack Sep 3, 2026
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from 99d3000 to 2de50dd Compare September 7, 2026 22:11
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from 2de50dd to feac69f Compare September 15, 2026 20:41
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from feac69f to a1c1a94 Compare September 25, 2026 03:44
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from a1c1a94 to bbd210e Compare October 13, 2026 14:04
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from bbd210e to 5d8eac3 Compare October 20, 2026 15:51
@renovate
renovate Bot force-pushed the renovate/pypi-langchain-openai-vulnerability branch from 5d8eac3 to 5adce50 Compare October 26, 2026 20:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Dev backlog

Development

Successfully merging this pull request may close these issues.

0 participants