Skip to content

security: bump LangChain ecosystem to 1.x (closes the remaining 8 Dependabot alerts)#44

Merged
kmadan merged 1 commit into
mainfrom
security/langchain-1x-bump
May 14, 2026
Merged

security: bump LangChain ecosystem to 1.x (closes the remaining 8 Dependabot alerts)#44
kmadan merged 1 commit into
mainfrom
security/langchain-1x-bump

Conversation

@kmadan
Copy link
Copy Markdown
Contributor

@kmadan kmadan commented May 14, 2026

Follow-up to #43. This is the path-to-zero PR for AICertify's Dependabot dashboard.

Unblocked by

mantric/langfair-mantric@33754a7 relaxes langfair's langchain ^0.3.7 cap to >=0.3.7,<2.0. Safe because langfair only imports langchain_core.messages.{HumanMessage,SystemMessage}, which is API-compatible across the 0.3 → 1.x transition.

What this closes

Severity Package From → To Advisory
high langchain-core <1.2.22 → 1.4.0 GHSA-qh6h-p6c9-ff54 (path traversal in load_prompt)
medium langchain-text-splitters <1.1.2 → 1.1.2 GHSA-fv5p-p927-qmxr (HTMLHeaderTextSplitter SSRF)
low langchain-core <1.2.11 → 1.4.0 GHSA-2g6r-c272-w58r (image_url SSRF)
low langchain-openai <1.1.14 → 1.2.1 GHSA-r7w7-9xr2-qq2r (DNS rebind SSRF)

Plus duplicates from Dependabot rescans. Total: ~8 alerts cleared, leaving only transformers <5.0.0rc3 (RC, not production-safe — resolves when 5.0.0 stable ships).

Constraints updated

langchain-core            >=0.3.85,<0.4    →  >=1.2.22
langchain                 >=0.3.30,<0.4    →  >=1.0.0
langchain-text-splitters  >=0.3.9,<0.4     →  >=1.1.2
langchain-openai          >=0.3.0,<0.4     →  >=1.1.14
langsmith                 >=0.7.31         →  >=0.8.0
langchain-community       >=0.3.27,<0.4    →  >=0.3.27  (no 1.x release yet)

Resolved versions

Package Version
langchain 1.3.0
langchain-core 1.4.0
langchain-openai 1.2.1
langchain-text-splitters 1.1.2
langchain-community 0.4.1
langsmith 0.8.4
langfair 0.4.0 (mantric fork @ python-3.12-support)

Risk

Low. AICertify imports nothing from langchain directly — every langchain use in our dep graph is transitive (langfair, posthog, sentry-sdk). The langchain_core APIs they touch (langchain_core.messages.{HumanMessage,SystemMessage}) are stable across the major-version boundary.

poetry lock --regenerate succeeded; CI exercises poetry install + import aicertify.

After merge

AICertify's Dependabot dashboard should drop from 9 open → 1 open (just the transformers RC, which has no production-safe fix yet).

Now that langfair-mantric@python-3.12-support allows LangChain >=0.3.7,<2.0
(mantric/langfair-mantric#33754a7), AICertify can move the transitive
LangChain stack from the security-stale 0.3.x line to the patched 1.x line.

## What this closes

| Severity | Package | From -> To | Advisory |
|---|---|---|---|
| high | langchain-core | <1.2.22 -> 1.4.0 | GHSA-qh6h-p6c9-ff54 (path traversal in load_prompt) |
| medium | langchain-text-splitters | <1.1.2 -> 1.1.2 | GHSA-fv5p-p927-qmxr (HTMLHeaderTextSplitter SSRF) |
| low | langchain-core | <1.2.11 -> 1.4.0 | GHSA-2g6r-c272-w58r (image_url SSRF) |
| low | langchain-openai | <1.1.14 -> 1.2.1 | GHSA-r7w7-9xr2-qq2r (DNS rebind SSRF) |

Plus duplicates of each from Dependabot's prior rescans. Net: ~8 alerts cleared.

## Constraints updated

  langchain-core         >=0.3.85,<0.4   ->  >=1.2.22
  langchain              >=0.3.30,<0.4   ->  >=1.0.0
  langchain-text-splitters >=0.3.9,<0.4  ->  >=1.1.2
  langchain-openai       >=0.3.0,<0.4    ->  >=1.1.14
  langsmith              >=0.7.31        ->  >=0.8.0
  langchain-community    >=0.3.27,<0.4   ->  >=0.3.27 (community hasn't shipped a 1.x yet)

## Verification

poetry.lock regenerated; resolver succeeded. Resolved versions:

  langchain 1.3.0, langchain-core 1.4.0, langchain-openai 1.2.1,
  langchain-text-splitters 1.1.2, langchain-community 0.4.1,
  langsmith 0.8.4, langfair 0.4.0 (mantric fork)

AICertify imports nothing from langchain directly — the only consumers
of LangChain APIs in our dep graph are langfair, posthog, and sentry-sdk,
all of which use langchain_core.messages which is API-compatible across
the 0.3 -> 1.x transition.
@github-actions github-actions Bot added the 🚀 enhancement New feature or request label May 14, 2026
@kmadan kmadan merged commit 99a9443 into main May 14, 2026
7 checks passed
@kmadan kmadan deleted the security/langchain-1x-bump branch May 14, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant