Skip to content

← Actionable
Low, CVSS 3.1amended

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

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

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (langchain-openai 1.1.14), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
3.1 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
EPSS
  • CVE-2026-41488: 0.16% estimated exploitation activity in the next 30 days; percentile 4.94 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary langchain-openai's urltosize() helper (used by getnumtokensfrommessages 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:…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-r7w7-9xr2-qq2r

  2. Revision 1 · created ·

    Published from osv record GHSA-r7w7-9xr2-qq2r

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-41488

Advisory: langchain-openai: Image token counting SSRF protection can be bypassed via DNS rebinding
IDs: CVE-2026-41488, GHSA-r7w7-9xr2-qq2r
Record: https://patchnext.com/advisories/cve-2026-41488 (revision 2, source checked 26 Oct 2026, 13:44 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Low (CVSS 3.1)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: langchain-openai 1.1.14. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI langchain-openai: affected < 1.1.14; fixed in 1.1.14

## Suggested inspection (read-only)
- `python -m pip show langchain-openai`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on langchain-openai.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-r7w7-9xr2-qq2r (OSV record GHSA-r7w7-9xr2-qq2r lists affected ranges: PyPI langchain-openai >=0 <1.1.14 (fixed))
- Verified: https://github.com/advisories/GHSA-r7w7-9xr2-qq2r (GitHub-reviewed advisory GHSA-r7w7-9xr2-qq2r lists affected ranges: PyPI langchain-openai >=0 <1.1.14)

Commands are suggestions: review each one before running it.

Loading voting…