Unsafe Deserialization in langchain-core (CVE-2026-44843)
Summary
Vulnerability in langchain-core (CVE-2026-44843). Confidential information can be exposed externally. Exploitable via RunnableWithMessageHistory. Mitigation: upgrade to 0.3.85 or later.
Original description
The description as published by the source.
LangChain contains older runtime code paths that deserialize run inputs, run outputs, or other application-controlled payloads using overly broad object allowlists. These paths may call load() with allowed_objects="all". This does not enable arbitrary Python object deserialization, but it does allow any trusted LangChain-serializable object to be revived, which is broader than these runtime paths require. As a result, attacker-supplied LangChain serialized constructor dictionaries may cause trusted runtime paths to instantiate classes with untrusted constructor arguments.
Applications are exposed only when all of the following are true:
- The application accepts untrusted structured input, such as JSON, from a user or network request.
- The application does not validate or canonicalize that input into an inert schema before invoking LangChain.
- Attacker-controlled nested dictionaries or lists are preserved in LangChain run inputs or outputs.
- The application uses an affected API path that later deserializes that run data.
Known affected runtime surfaces include:
RunnableWithMessageHistoryastream_log()astream_events(version="v1")
Related unsafe deserialization patterns may also affect applications that explicitly load serialized LangChain prompt or runnable objects from untrusted sources, including shared prompt stores, Hub artifacts with model configuration, or other application-controlled serialization stores.
Applications that validate incoming…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-44843 has been found in langchain-core.
Attackers can target a specific entry point like RunnableWithMessageHistory over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 8.2/10.
What to do: upgrade langchain-core to 0.3.85 or later.
If unsure, ask your IT team or search "langchain-core CVE-2026-44843" on the vendor's site.
CVE-2026-44843 (langchain-core) — CWE-502 / CVSS v3 8.2
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: RunnableWithMessageHistory / _is_lc_secret / AIMessage / HumanMessage
Patched: 0.3.85 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Unsafe deserialization (CWE-502) exists in langchain-core. Attackers reach the vulnerable code path via RunnableWithMessageHistory without authentication.
Check the vendor advisory for the affected versions of langchain-core. Attack surface: RunnableWithMessageHistory / _is_lc_secret / AIMessage / HumanMessage.
Severity: High (CVSS 8.2/10). Confidential information can be exposed externally.
Update to 0.3.85.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'langchain-core' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'langchain-core' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
langchain-coreを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade langchain-core to 0.3.85ステージング環境で 0.3.85 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- patch security-advisories@github.com
- web github.com