{"id":"CVE-2026-41481","aliases":["CVE-2026-41481","GHSA-fv5p-p927-qmxr","PYSEC-2026-77"],"related":[],"kind":"vulnerability","state":"published","title":"LangChain: HTMLHeaderTextSplitter.split_text_from_url SSRF Redirect Bypass","summary":"LangChain is a framework for building agents and LLM-powered applications. Prior to langchain-text-splitters\n 1.1.2, HTMLHeaderTextSplitter.split_text_from_url() validated the initial URL using validate_safe_url() but then performed the fetch with requests.get() with redirects enabled (the default). Because redirect targets were not revalidated, a URL pointing to an attacker-controlled server could redirect to internal, localhost, or cloud metadata endpoints, bypassing SSRF protections. The response body is parsed and returned as Document objects to the calling application code. Whether this constitutes a data exfiltration path depends on the application: if it exposes Document contents (or derivatives) back to the requester who supplied the URL, sensitive data from internal endpoints could be leaked. Applications that store or process Documents internally without returning raw content to the requester are not directly exposed to data exfiltration through this issue. This vulnerability is fixed in 1.1.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"LangChain is a framework for building agents and LLM-powered applications. Prior to langchain-text-splitters\n 1.1.2, HTMLHeaderTextSplitter.split_text_from_url() validated the initial URL using validate_safe_url() but then performed the fetch with requests.get() with redirects enabled (the default). Because redirect targets were not revalidated, a URL pointing to an attacker-controlled server could redirect to internal, localhost, or cloud metadata endpoints, bypassing SSRF protections. The response body is parsed and returned as Document objects to the calling application code. Whether this constitutes a data exfiltration path depends on the application: if it exposes Document contents (or derivatives) back to the requester who supplied the URL, sensitive data from internal endpoints could be leaked. Applications that store or process Documents internally without returning raw content to the requester are not directly exposed to data exfiltration through this issue. This vulnerability is fixed in 1.1.2.","source":"cvelist"},{"lang":"en","text":"## Summary\n\n`HTMLHeaderTextSplitter.split_text_from_url()` validated the initial URL using `validate_safe_url()` but then performed the fetch with `requests.get()` with redirects enabled (the default). Because redirect targets were not revalidated, a URL pointing to an attacker-controlled server could redirect to internal, localhost, or cloud metadata endpoints, bypassing SSRF protections.\n\nThe response body is parsed and returned as `Document` objects to the calling application code. Whether this constitutes a data exfiltration path depends on the application: if it exposes Document contents (or derivatives) back to the requester who supplied the URL, sensitive data from internal endpoints could be leaked. Applications that store or process Documents internally without returning raw content to the requester are not directly exposed to data exfiltration through this issue.\n\n## Affected versions\n\n- `langchain-text-splitters` < 1.1.2\n\n## Patched versions\n\n- `langchain-text-splitters` >= 1.1.2 (requires `langchain-core` >= 1.2.31)\n\n## Affected code\n\n**File:** `libs/text-splitters/langchain_text_splitters/html.py` — `split_text_from_url()`\n\nThe vulnerable pattern validated the URL once then fetched with redirects enabled:\n\n```python\nvalidate_safe_url(url, allow_private=False, allow_http=True)\nresponse = requests.get(url, timeout=timeout, **kwargs)\n```\n\n## Attack scenario\n\n1. A developer passes external URLs to `split_text_from_url()`, relying on its\n   built-in `validate_safe_url()` check to block requests to internal networks.\n2. An attacker supplies a URL pointing to a public host they control. The URL\n   passes `validate_safe_url()` (public hostname, public IP).\n3. The attacker's server responds with a `302` redirect to an internal endpoint\n   (e.g., an unauthenticated internal admin API, or a cloud instance metadata\n   service that does not require request headers — such as AWS IMDSv1).\n4. `requests.get()` follows the redirect automatically. The redirect target is\n   **not** revalidated.\n5. The response body is parsed and returned as `Document` objects to the\n   application.\n\n**Notes:**\n\n- The core issue is a bypass of an explicitly provided SSRF protection.\n  `split_text_from_url()` included `validate_safe_url()` specifically to be\n  safe with untrusted URLs — the redirect loophole defeated that guarantee.\n- Cloud metadata endpoints that require special headers (AWS IMDSv2, GCP, Azure)\n  are not reachable through this bug because the attacker does not control\n  request headers. AWS IMDSv1, which requires no headers, is reachable.\n- Data exfiltration requires the application to return Document contents to the\n  party that supplied the URL. The SSRF itself — forcing the server to issue a\n  request to an internal endpoint — does not require this.\n\n## Fix\n\nThe fix replaces `requests.get()` with an SSRF-safe httpx transport (`SSRFSafeSyncTransport` from `langchain-core`) that validates DNS results and pins connections to validated IPs on every request, including redirect targets, eliminating redirect-based bypasses.\n\nAdditionally, `split_text_from_url()` has been deprecated. Users should fetch HTML content themselves and pass it to `split_text()` directly.","format":"markdown","source":"ghsa"},{"lang":"es","text":"LangChain es un framework para construir agentes y aplicaciones impulsadas por LLM. Antes de langchain-text-splitters 1.1.2, HTMLHeaderTextSplitter.split_text_from_url() validaba la URL inicial usando validate_safe_url() pero luego realizaba la obtención con requests.get() con redirecciones habilitadas (el valor predeterminado). Debido a que los destinos de redirección no se revalidaban, una URL que apuntaba a un servidor controlado por un atacante podría redirigir a puntos finales internos, de localhost o de metadatos en la nube, eludiendo las protecciones de SSRF. El cuerpo de la respuesta se analiza y se devuelve como objetos Document al código de la aplicación que realiza la llamada. Si esto constituye una ruta de exfiltración de datos depende de la aplicación: si expone el contenido de Document (o sus derivados) de vuelta al solicitante que proporcionó la URL, los datos sensibles de los puntos finales internos podrían filtrarse. Las aplicaciones que almacenan o procesan Documentos internamente sin devolver contenido sin procesar al solicitante no están directamente expuestas a la exfiltración de datos a través de este problema. Esta vulnerabilidad se corrige en la versión 1.1.2.","source":"nvd"}],"published":"2026-04-16T22:53:32.000Z","modified":"2026-10-26T22:10:00.163Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 1.1.2","status":"affected"}],"vendor":"langchain-ai","product":"langchain-text-splitters","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Migration Toolkit for Applications 8","package":"mta/mta-solution-server-rhel9","cpe":"cpe:/a:redhat:migration_toolkit_applications:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"OpenShift Lightspeed","package":"openshift-lightspeed/lightspeed-service-api-rhel9","cpe":"cpe:/a:redhat:openshift_lightspeed","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"ansible-automation-platform-24/lightspeed-rhel8","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"ansible-automation-platform-25/lightspeed-chatbot-rhel8","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"ansible-automation-platform-25/lightspeed-rhel8","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-llama-stack-core-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-trustyai-nemo-guardrails-server-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.1.2"}],"ecosystem":"PyPI","package":"langchain-text-splitters","purl":"pkg:pypi/langchain-text-splitters","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.1.2"}],"vendor":"langchain","product":"langchain-text-splitters","cpe":"cpe:2.3:a:langchain:langchain-text-splitters:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.1.2"}],"ecosystem":"PyPI","package":"langchain-text-splitters","purl":"pkg:pypi/langchain-text-splitters","source":"pysec"}],"references":[{"url":"https://github.com/langchain-ai/langchain/security/advisories/GHSA-fv5p-p927-qmxr","tags":["advisory","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-41481","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2461733","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41481.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41481","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/langchain-ai/langchain","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/langchain-text-splitters/PYSEC-2026-77.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-25T01:54:07.352Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41481","url":"https://www.cve.org/CVERecord?id=CVE-2026-41481","licence":"CVE Terms of Use","modified":"2026-07-15T00:59:28.460Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fv5p-p927-qmxr","url":"https://github.com/advisories/GHSA-fv5p-p927-qmxr","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:44.294Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41481","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41481","licence":"Public domain","modified":"2026-10-26T22:10:00.163Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-77","url":"https://osv.dev/vulnerability/PYSEC-2026-77","licence":"CC-BY-4.0","modified":"2026-05-20T09:19:04.238Z"}],"updatedAt":"2026-11-25T22:59:19.586Z","epss":{"score":0.0027,"percentile":0.20587,"date":"2026-12-01T12:00:22.000Z"}}