本文へ移動
English version →
重大 9.3

LangChain Coreに シリアライズ処理の欠陥、機密情報が漏えいのおそれ

CVE-2025-68664 SecPulse初出

概要

LangChain Core の dumps() および dumpd() 関数に、シリアライズ時のエスケープ不備による脆弱性が見つかりました。悪意あるデータを処理させると、読み込み時に正規のオブジェクトとして扱われ、機密情報が抜き取られるおそれがあります。影響を受けるのは 0.3.81 未満および 1.0.0 以上 1.2.5 未満のバージョンで、0.3.81 または 1.2.5 以降への更新が必要です。

AI要約

SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。

langchain-core という製品で、CVE-2025-68664 という番号がついた弱点 (脆弱性) が見つかりました。
機密情報が外部に流出する可能性があります。重要度は CVSS スコア 9.3/10 です。
対策: langchain-core を 0.3.81, 1.2.5 以上に更新してください。
心配なら、システム担当者や製品の公式サイトで「langchain-core CVE-2025-68664」を検索してください。

CVE-2025-68664 (langchain-core) — CWE-502 / CVSS v3 9.3
攻撃ベクター: ネットワーク経由 (リモート攻撃可) / 認証不要 / 被害者操作不要
修正バージョン: 0.3.81, 1.2.5 (即時適用推奨)
対応方針: 1) SBOMで影響バージョン横断確認, 2) ステージング検証→本番更新, 3) WAF/プロキシで該当エンドポイントを監視, 4) ログでIOC調査。
参考: 当ページの『参照URL』の GHSA / vendor advisory / patched release を参照。

何が問題か

langchain-core に 安全でないデシリアライゼーション (CWE-502) があります。

影響範囲

langchain-core の影響バージョンはベンダーのアドバイザリで確認してください。

重要度

重要度: 最重要 (CVSS 9.3/10)。機密情報が外部に流出する可能性があります。

修正方法

0.3.81, 1.2.5 に更新してください。

暫定回避

修正版が未提供時は、影響機能の無効化・WAFルール・ネットワークACLでの遮断を検討。

検知方法

Webサーバ・プロキシ・WAFログで該当CVEのIOCに合致する不審リクエストを検索。SBOM/依存ファイルで影響バージョンを横断確認。

対応アクション

SOC/SREチームが順番に実行すべき具体的なステップとコマンド例

  1. 1
    影響範囲の特定identify
    grep -r 'langchain-core' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で langchain-core を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    パッチ適用patch
    Upgrade langchain-core to 0.3.81, 1.2.5

    ステージング環境で 0.3.81, 1.2.5 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    事後検証verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

影響パッケージ

パッケージ影響を受ける版 → 修正版
PyPIlangchain-core
0.3.81 未満→ 0.3.81
piplangchain-core
0.3.81 未満→ 0.3.81
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

Summary

A serialization injection vulnerability exists in LangChain's dumps() and dumpd() functions. The functions do not escape dictionaries with 'lc' keys when serializing free-form dictionaries. The 'lc' key is used internally by LangChain to mark serialized objects. When user-controlled data contains this key structure, it is treated as a legitimate LangChain object during deserialization rather than plain user data.

Attack surface

The core vulnerability was in dumps() and dumpd(): these functions failed to escape user-controlled dictionaries containing 'lc' keys. When this unescaped data was later deserialized via load() or loads(), the injected structures were treated as legitimate LangChain objects rather than plain user data.

This escaping bug enabled several attack vectors:

  1. Injection via user data: Malicious LangChain object structures could be injected through user-controlled fields like metadata, additional_kwargs, or response_metadata
  2. Class instantiation within trusted namespaces: Injected manifests could instantiate any Serializable subclass, but only within the pre-approved trusted namespaces (langchain_core, langchain, langchain_community). This includes classes with side effects in __init__ (network calls, file operations, etc.). Note that namespace validation was already enforced before this patch, so arbitrary classes outside these trusted namespaces could not be instantiated.

Security hardenin…

出典: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

参照URL

当サイトでは、アクセス解析と広告の効果測定のためにCookieを使います。株式会社Gameのサイト共通の設定です。 詳しく