CyberGuardAI 安全情报工作区
AI 安全知识情报
LJH 管理员
返回首页 漏洞库

LangChain聊天历史会话标识查询注入

摘要与解读

MongoDBChatMessageHistory会话标识未强制字符串,可致跨会话访问。

六维情报分析

6 个维度 · 原文可溯源

影响范围

  • @langchain/mongodb · <= 1.3.0(不高于 1.3.0)
  • MongoDBChatMessageHistory未在运行时强制session标识符为字符串,结构化标识符可能被当作MongoDB查询条件。受影响条件:应用将不可信session标识符传入该类且多用户历史存于同一集合,攻击者可能读取、修改或删除他人会话。

    原文依据 · 2
    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri
    查看原文 · v1
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6
    查看原文 · v1

关联资产

  • @langchain/mongodb · npm
  • 来源提及npm包@langchain/mongodb(受影响<=1.3.0,修复1.3.1)及MongoDBChatMessageHistory组件;

    原文依据 · 2
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6
    查看原文 · v1
    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri
    查看原文 · v1

风险评估

  • 来源称可导致跨会话访问他人对话记录(读/改/删)。CVSS出现两个值:0.0(vector为空)与6.0(CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N),存在冲突,EPSS与实际利用成功率未提供。

    原文依据 · 2
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6
    查看原文 · v1
    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri
    查看原文 · v1

相关研究

  • 公告标题为LangChain的MongoDBChatMessageHistory查询注入导致跨会话访问,涉及npm包@langchain/mongodb;引用指向langchain-ai/langchainjs安全公告GHSA-m6rx-h84q-8r95(WEB类型)。

    原文依据 · 2
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6
    查看原文 · v1
    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri
    查看原文 · v1

验证资料

  • 来源为GitHub安全公告文本,列出受影响版本<=1.3.0、修复版本1.3.1及CVSS向量,但所选摘录未包含PoC、复现步骤或实验结果;独立复现情况未知。

    原文依据 · 2
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6
    查看原文 · v1
    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri
    查看原文 · v1

处置建议

  • 来源明确建议升级为修复方案,升级至@langchain/mongodb 1.3.1;另可核查是否将不可信请求字段直接作为session标识符传入,并确认多用户历史是否共用同一集合。

    原文依据 · 2
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6
    查看原文 · v1
    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri
    查看原文 · v1
模型与引文记录
模型
mimo-v2.6-pro
生成时间
记录编号
REQ-34383ebaff3946fd9b18d4fddfb4a894
分析原文
查看原文 · v1
分析与审核记录

AI 情报分析

mimo-v2.6-pro · 2026-10-17 12:27 UTC

影响范围

  • MongoDBChatMessageHistory未在运行时强制session标识符为字符串,结构化标识符可能被当作MongoDB查询条件。受影响条件:应用将不可信session标识符传入该类且多用户历史存于同一集合,攻击者可能读取、修改或删除他人会话。

    原文依据 · 2 处
    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri

    查看知识库原文 · 字符 0–600 · v1

    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6

    查看知识库原文 · 字符 1251–1851 · v1

风险评估

  • 来源称可导致跨会话访问他人对话记录(读/改/删)。CVSS出现两个值:0.0(vector为空)与6.0(CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N),存在冲突,EPSS与实际利用成功率未提供。

    原文依据 · 2 处
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6

    查看知识库原文 · 字符 1251–1851 · v1

    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri

    查看知识库原文 · 字符 0–600 · v1

相关研究

  • 公告标题为LangChain的MongoDBChatMessageHistory查询注入导致跨会话访问,涉及npm包@langchain/mongodb;引用指向langchain-ai/langchainjs安全公告GHSA-m6rx-h84q-8r95(WEB类型)。

    原文依据 · 2 处
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6

    查看知识库原文 · 字符 1251–1851 · v1

    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri

    查看知识库原文 · 字符 0–600 · v1

验证资料

  • 来源为GitHub安全公告文本,列出受影响版本<=1.3.0、修复版本1.3.1及CVSS向量,但所选摘录未包含PoC、复现步骤或实验结果;独立复现情况未知。

    原文依据 · 2 处
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6

    查看知识库原文 · 字符 1251–1851 · v1

    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri

    查看知识库原文 · 字符 0–600 · v1

适用对象

  • 来源提及npm包@langchain/mongodb(受影响<=1.3.0,修复1.3.1)及MongoDBChatMessageHistory组件;

    原文依据 · 2 处
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6

    查看知识库原文 · 字符 1251–1851 · v1

    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri

    查看知识库原文 · 字符 0–600 · v1

处置建议

  • 来源明确建议升级为修复方案,升级至@langchain/mongodb 1.3.1;另可核查是否将不可信请求字段直接作为session标识符传入,并确认多用户历史是否共用同一集合。

    原文依据 · 2 处
    from an untrusted request field. Upgrading remains the recommended remediation. affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"} affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"} fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"} cvss: {"score": 0.0, "vector": null} cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"} references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6

    查看知识库原文 · 字符 1251–1851 · v1

    GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier. Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation. Applications that deri

    查看知识库原文 · 字符 0–600 · v1

查看分析记录

更新情报分析

由大模型梳理影响范围、风险、研究方法、验证资料、适用对象和处置建议。

请先在富化流程中配置并授权后台模型分析。

模型分析设置

情报标识:GHSA-m6rx-h84q-8r95 · CVE-2026-106119

来源字段与 CVSS 指标

受影响产品

@langchain/mongodb · npm

查看来源依据

结构化证据路径 $[37].vulnerabilities[0].package

{"ecosystem": "npm", "name": "@langchain/mongodb"}

受影响版本

@langchain/mongodb · <= 1.3.0(不高于 1.3.0)

查看来源依据

结构化证据路径 $[37].vulnerabilities[0].vulnerable_version_range

"<= 1.3.0"
字段所属产品与版本上下文
[
  {
    "format": "github_advisory",
    "json_path": "$[37].vulnerabilities[0]",
    "quote": "{\"first_patched_version\": \"1.3.1\", \"package\": {\"ecosystem\": \"npm\", \"name\": \"@langchain/mongodb\"}, \"vulnerable_functions\": [], \"vulnerable_version_range\": \"\u003c= 1.3.0\"}",
    "record_path": "$.vulnerabilities[0]"
  }
]

来源列出的修复版本

@langchain/mongodb · 1.3.1

查看来源依据

结构化证据路径 $[37].vulnerabilities[0].first_patched_version

"1.3.1"
字段所属产品与版本上下文
[
  {
    "format": "github_advisory",
    "json_path": "$[37].vulnerabilities[0]",
    "quote": "{\"first_patched_version\": \"1.3.1\", \"package\": {\"ecosystem\": \"npm\", \"name\": \"@langchain/mongodb\"}, \"vulnerable_functions\": [], \"vulnerable_version_range\": \"\u003c= 1.3.0\"}",
    "record_path": "$.vulnerabilities[0]"
  }
]

来源风险评分

0.0 / 10 · CVSS v3(来源字段)

查看来源依据

结构化证据路径 $[37].cvss_severities.cvss_v3

{"score": 0.0, "vector_string": null}

6.0 / 10 · CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N · CVSS 4.0

查看来源依据

结构化证据路径 $[37].cvss_severities.cvss_v4

{"score": 6.0, "vector_string": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"}

来源处置建议

Users of affected versions should upgrade to version 1.3.1 or later. The patched version validates session identifiers at runtime and ensures they are compared as literal values in MongoDB queries.

查看来源依据

原文位置 title_and_content · 885–1082

Users of affected versions should upgrade to version 1.3.1 or later. The patched version validates session identifiers at runtime and ensures they are compared as literal values in MongoDB queries.

资料档案

文献来源与参考链接

当前保存的来源版本 · v1

结构化格式
github_advisory
原始标题与分类记录

LangChain: MongoDBChatMessageHistory query injection can allow cross-session access

研究方向
攻击方法
影响维度
完整性
风险类型
待人工确认
相关技术
待人工确认

当前为离线关键词规则模式。

分类规则与原始字段
攻击方法 · injection
LangChain: MongoDBChatMessageHistory query injection can allow cross-session access GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not e
完整性 · injection
LangChain: MongoDBChatMessageHistory query injection can allow cross-session access GHSA-m6rx-h84q-8r95 ## Impact `MongoDBChatMessageHistory` did not e
{
  "ai_relevance": {
    "evidence": [
      {
        "end_offset": 9,
        "location": "title_and_content",
        "quote": "LangChain",
        "rule": "ai_component",
        "start_offset": 0
      },
      {
        "end_offset": 855,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 846
      },
      {
        "end_offset": 1475,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 1466
      },
      {
        "end_offset": 1557,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 1548
      },
      {
        "end_offset": 1658,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 1649
      },
      {
        "end_offset": 1892,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 1883
      },
      {
        "end_offset": 2107,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 2098
      },
      {
        "end_offset": 2203,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 2194
      },
      {
        "end_offset": 2336,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 2327
      },
      {
        "end_offset": 2375,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 2366
      }
    ],
    "matches": [
      {
        "end_offset": 9,
        "location": "title_and_content",
        "quote": "LangChain",
        "rule": "ai_component",
        "start_offset": 0
      },
      {
        "end_offset": 855,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 846
      },
      {
        "end_offset": 1475,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 1466
      },
      {
        "end_offset": 1557,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 1548
      },
      {
        "end_offset": 1658,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 1649
      },
      {
        "end_offset": 1892,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 1883
      },
      {
        "end_offset": 2107,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 2098
      },
      {
        "end_offset": 2203,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 2194
      },
      {
        "end_offset": 2336,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 2327
      },
      {
        "end_offset": 2375,
        "location": "title_and_content",
        "quote": "langchain",
        "rule": "ai_component",
        "start_offset": 2366
      }
    ],
    "method": "explainable_keyword_rules",
    "reason": "Matched AI topic or component evidence",
    "relevant": true
  },
  "entity_ids": [
    "GHSA-m6rx-h84q-8r95",
    "CVE-2026-106119"
  ],
  "facts": [
    {
      "evidence": {
        "format": "github_advisory",
        "json_path": "$[37].vulnerabilities[0].package",
        "quote": "{\"ecosystem\": \"npm\", \"name\": \"@langchain/mongodb\"}",
        "record_path": "$.vulnerabilities[0].package"
      },
      "field": "affected_products",
      "value": {
        "ecosystem": "npm",
        "name": "@langchain/mongodb"
      }
    },
    {
      "evidence": {
        "context": [
          {
            "format": "github_advisory",
            "json_path": "$[37].vulnerabilities[0]",
            "quote": "{\"first_patched_version\": \"1.3.1\", \"package\": {\"ecosystem\": \"npm\", \"name\": \"@langchain/mongodb\"}, \"vulnerable_functions\": [], \"vulnerable_version_range\": \"\u003c= 1.3.0\"}",
            "record_path": "$.vulnerabilities[0]"
          }
        ],
        "format": "github_advisory",
        "json_path": "$[37].vulnerabilities[0].vulnerable_version_range",
        "quote": "\"\u003c= 1.3.0\"",
        "record_path": "$.vulnerabilities[0].vulnerable_version_range"
      },
      "field": "affected_versions",
      "value": {
        "package": {
          "ecosystem": "npm",
          "name": "@langchain/mongodb"
        },
        "range": "\u003c= 1.3.0"
      }
    },
    {
      "evidence": {
        "context": [
          {
            "format": "github_advisory",
            "json_path": "$[37].vulnerabilities[0]",
            "quote": "{\"first_patched_version\": \"1.3.1\", \"package\": {\"ecosystem\": \"npm\", \"name\": \"@langchain/mongodb\"}, \"vulnerable_functions\": [], \"vulnerable_version_range\": \"\u003c= 1.3.0\"}",
            "record_path": "$.vulnerabilities[0]"
          }
        ],
        "format": "github_advisory",
        "json_path": "$[37].vulnerabilities[0].first_patched_version",
        "quote": "\"1.3.1\"",
        "record_path": "$.vulnerabilities[0].first_patched_version"
      },
      "field": "fixed_versions",
      "value": {
        "package": {
          "ecosystem": "npm",
          "name": "@langchain/mongodb"
        },
        "version": "1.3.1"
      }
    },
    {
      "evidence": {
        "format": "github_advisory",
        "json_path": "$[37].cvss_severities.cvss_v3",
        "quote": "{\"score\": 0.0, \"vector_string\": null}",
        "record_path": "$.cvss_severities.cvss_v3"
      },
      "field": "cvss",
      "value": {
        "score": 0.0,
        "vector": null
      }
    },
    {
      "evidence": {
        "format": "github_advisory",
        "json_path": "$[37].cvss_severities.cvss_v4",
        "quote": "{\"score\": 6.0, \"vector_string\": \"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N\"}",
        "record_path": "$.cvss_severities.cvss_v4"
      },
      "field": "cvss",
      "value": {
        "score": 6.0,
        "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"
      }
    },
    {
      "evidence": {
        "format": "github_advisory",
        "json_path": "$[37].references[0]",
        "quote": "\"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95\"",
        "record_path": "$.references[0]"
      },
      "field": "references",
      "value": {
        "types": [
          "WEB"
        ],
        "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95"
      }
    },
    {
      "evidence": {
        "format": "github_advisory",
        "json_path": "$[37].references[1]",
        "quote": "\"https://nvd.nist.gov/vuln/detail/CVE-2026-106119\"",
        "record_path": "$.references[1]"
      },
      "field": "references",
      "value": {
        "types": [
          "WEB"
        ],
        "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-106119"
      }
    },
    {
      "evidence": {
        "format": "github_advisory",
        "json_path": "$[37].references[2]",
        "quote": "\"https://github.com/langchain-ai/langchainjs/pull/11672\"",
        "record_path": "$.references[2]"
      },
      "field": "references",
      "value": {
        "types": [
          "WEB"
        ],
        "url": "https://github.com/langchain-ai/langchainjs/pull/11672"
      }
    },
    {
      "evidence": {
        "format": "github_advisory",
        "json_path": "$[37].references[3]",
        "quote": "\"https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af\"",
        "record_path": "$.references[3]"
      },
      "field": "references",
      "value": {
        "types": [
          "WEB"
        ],
        "url": "https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af"
      }
    },
    {
      "evidence": {
        "format": "github_advisory",
        "json_path": "$[37].references[4]",
        "quote": "\"https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1\"",
        "record_path": "$.references[4]"
      },
      "field": "references",
      "value": {
        "types": [
          "WEB"
        ],
        "url": "https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1"
      }
    },
    {
      "evidence": {
        "format": "github_advisory",
        "json_path": "$[37].references[5]",
        "quote": "\"https://github.com/advisories/GHSA-m6rx-h84q-8r95\"",
        "record_path": "$.references[5]"
      },
      "field": "references",
      "value": {
        "types": [
          "WEB"
        ],
        "url": "https://github.com/advisories/GHSA-m6rx-h84q-8r95"
      }
    },
    {
      "evidence": {
        "end_offset": 1082,
        "location": "title_and_content",
        "quote": "Users of affected versions should upgrade to version 1.3.1 or later. The patched version validates session identifiers at runtime and ensures they are compared as literal values in MongoDB queries.",
        "start_offset": 885
      },
      "field": "mitigations",
      "value": "Users of affected versions should upgrade to version 1.3.1 or later. The patched version validates session identifiers at runtime and ensures they are compared as literal values in MongoDB queries."
    }
  ],
  "method": "source_grounded_extraction",
  "unknown_fields": [
    "papers",
    "poc"
  ]
}
原始采集文本
GHSA-m6rx-h84q-8r95
## Impact

`MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier.

Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation.

Applications that derive the session identifier from an authenticated, server-controlled value and enforce its type are not affected by this path.

## Patches

The issue is fixed in `@langchain/mongodb` version **1.3.1**.

Users of affected versions should upgrade to version 1.3.1 or later. The patched version validates session identifiers at runtime and ensures they are compared as literal values in MongoDB queries.

## Workarounds

If an immediate upgrade is not possible, applications must reject session identifiers that are not non-empty strings. Session identifiers should be derived from an authenticated, server-controlled value and must not be passed directly from an untrusted request field.

Upgrading remains the recommended remediation.
affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"}
affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"}
fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"}
cvss: {"score": 0.0, "vector": null}
cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"}
references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95"}
references: {"types": ["WEB"], "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-106119"}
references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/pull/11672"}
references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af"}
references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1"}
references: {"types": ["WEB"], "url": "https://github.com/advisories/GHSA-m6rx-h84q-8r95"}
采集信息与校验
完整来源元数据
{
  "format": "github_advisory",
  "raw_record": {
    "comments": 4,
    "credits": [
      {
        "type": "reporter",
        "user": {
          "avatar_url": "https://avatars.githubusercontent.com/u/286391906?v=4",
          "events_url": "https://api.github.com/users/iaohkut-from-NightWolf-Team/events{/privacy}",
          "followers_url": "https://api.github.com/users/iaohkut-from-NightWolf-Team/followers",
          "following_url": "https://api.github.com/users/iaohkut-from-NightWolf-Team/following{/other_user}",
          "gists_url": "https://api.github.com/users/iaohkut-from-NightWolf-Team/gists{/gist_id}",
          "gravatar_id": "",
          "html_url": "https://github.com/iaohkut-from-NightWolf-Team",
          "id": 286391906,
          "login": "iaohkut-from-NightWolf-Team",
          "node_id": "U_kgDOERH-Yg",
          "organizations_url": "https://api.github.com/users/iaohkut-from-NightWolf-Team/orgs",
          "received_events_url": "https://api.github.com/users/iaohkut-from-NightWolf-Team/received_events",
          "repos_url": "https://api.github.com/users/iaohkut-from-NightWolf-Team/repos",
          "site_admin": false,
          "starred_url": "https://api.github.com/users/iaohkut-from-NightWolf-Team/starred{/owner}{/repo}",
          "subscriptions_url": "https://api.github.com/users/iaohkut-from-NightWolf-Team/subscriptions",
          "type": "User",
          "url": "https://api.github.com/users/iaohkut-from-NightWolf-Team",
          "user_view_type": "public"
        }
      }
    ],
    "cve_id": "CVE-2026-106119",
    "cvss": {
      "score": null,
      "vector_string": null
    },
    "cvss_severities": {
      "cvss_v3": {
        "score": 0.0,
        "vector_string": null
      },
      "cvss_v4": {
        "score": 6.0,
        "vector_string": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"
      }
    },
    "cwes": [
      {
        "cwe_id": "CWE-943",
        "name": "Improper Neutralization of Special Elements in Data Query Logic"
      }
    ],
    "description": "## Impact\n\n`MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier.\n\nApplications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users\u2019 histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user\u2019s stored conversation.\n\nApplications that derive the session identifier from an authenticated, server-controlled value and enforce its type are not affected by this path.\n\n## Patches\n\nThe issue is fixed in `@langchain/mongodb` version **1.3.1**.\n\nUsers of affected versions should upgrade to version 1.3.1 or later. The patched version validates session identifiers at runtime and ensures they are compared as literal values in MongoDB queries.\n\n## Workarounds\n\nIf an immediate upgrade is not possible, applications must reject session identifiers that are not non-empty strings. Session identifiers should be derived from an authenticated, server-controlled value and must not be passed directly from an untrusted request field.\n\nUpgrading remains the recommended remediation.",
    "epss": {
      "percentage": 0.00463,
      "percentile": 0.38549
    },
    "ghsa_id": "GHSA-m6rx-h84q-8r95",
    "github_reviewed_at": "2026-10-08T17:52:22Z",
    "html_url": "https://github.com/advisories/GHSA-m6rx-h84q-8r95",
    "identifiers": [
      {
        "type": "GHSA",
        "value": "GHSA-m6rx-h84q-8r95"
      },
      {
        "type": "CVE",
        "value": "CVE-2026-106119"
      }
    ],
    "nvd_published_at": "2026-10-06T19:17:42Z",
    "published_at": "2026-10-08T17:52:22Z",
    "references": [
      "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95",
      "https://nvd.nist.gov/vuln/detail/CVE-2026-106119",
      "https://github.com/langchain-ai/langchainjs/pull/11672",
      "https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af",
      "https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1",
      "https://github.com/advisories/GHSA-m6rx-h84q-8r95"
    ],
    "repository_advisory_url": "https://api.github.com/repos/langchain-ai/langchainjs/security-advisories/GHSA-m6rx-h84q-8r95",
    "severity": "medium",
    "source_code_location": "https://github.com/langchain-ai/langchainjs",
    "summary": "LangChain: MongoDBChatMessageHistory query injection can allow cross-session access",
    "type": "reviewed",
    "updated_at": "2026-10-08T17:52:24Z",
    "url": "https://api.github.com/advisories/GHSA-m6rx-h84q-8r95",
    "vulnerabilities": [
      {
        "first_patched_version": "1.3.1",
        "package": {
          "ecosystem": "npm",
          "name": "@langchain/mongodb"
        },
        "vulnerable_functions": [],
        "vulnerable_version_range": "\u003c= 1.3.0"
      }
    ],
    "withdrawn_at": null
  },
  "record_path": "$[37]"
}
原文版本历史与校验
版本入库更新时间来源发布日期校验标识
v1 · 正在查看2026-10-17 12:06 UTC2026-10-08 17:52 UTC1037e5686cdb6433c76429cb5638f2f93c4c3a22d2adc2eb583b8efba9eac841
可引用分片 · 2 段

CHK-b2bec9efa341d7c11531309d

GHSA-m6rx-h84q-8r95
## Impact

`MongoDBChatMessageHistory` did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier.

Applications are affected when they pass untrusted session identifier input to `MongoDBChatMessageHistory` and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation.

Applications that derive the session identifier from an authenticated, server-controlled value and enforce its type are not affected by this path.

## Patches

The issue is fixed in `@langchain/mongodb` version **1.3.1**.

Users of affected versions should upgrade to version 1.3.1 or later. The patched version validates session identifiers at runtime and ensures they are compared as literal values in MongoDB queries.

## Workarounds

If an immediate upgrade is not possible, applications must reject session identifiers that are not non-empty strings. Session identifiers should be derived from an authenticated, server-controlled value and must not be passed directly from an untrusted request field.

Upgrading remains the recommended remediation.

CHK-9226316c5bf0a2a58b235a13

from an authenticated, server-controlled value and must not be passed directly from an untrusted request field.

Upgrading remains the recommended remediation.
affected_products: {"ecosystem": "npm", "name": "@langchain/mongodb"}
affected_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "range": "<= 1.3.0"}
fixed_versions: {"package": {"ecosystem": "npm", "name": "@langchain/mongodb"}, "version": "1.3.1"}
cvss: {"score": 0.0, "vector": null}
cvss: {"score": 6.0, "vector": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"}
references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-m6rx-h84q-8r95"}
references: {"types": ["WEB"], "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-106119"}
references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/pull/11672"}
references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/commit/946e3d856ff1f8ce7f7b9374c83f680a6ada79af"}
references: {"types": ["WEB"], "url": "https://github.com/langchain-ai/langchainjs/releases/tag/@langchain/mongodb@1.3.1"}
references: {"types": ["WEB"], "url": "https://github.com/advisories/GHSA-m6rx-h84q-8r95"}
处理记录
补充资料

中文译文

正文译文暂缺,以下仅为中文摘要。

中文摘要

MongoDBChatMessageHistory会话标识未强制字符串,可致跨会话访问。

已采集原文

访问来源网页

影响 · Impact

MongoDBChatMessageHistory did not enforce the documented string type for session identifiers at runtime. In affected applications, a structured session identifier could be interpreted as a MongoDB query condition rather than as a literal identifier.

Applications are affected when they pass untrusted session identifier input to MongoDBChatMessageHistory and store multiple users’ histories in the same collection. An attacker who can invoke chat-history operations may be able to read, modify, or delete another user’s stored conversation.

Applications that derive the session identifier from an authenticated, server-controlled value and enforce its type are not affected by this path.

Patches

The issue is fixed in @langchain/mongodb version 1.3.1.

Users of affected versions should upgrade to version 1.3.1 or later. The patched version validates session identifiers at runtime and ensures they are compared as literal values in MongoDB queries.

临时措施 · Workarounds

If an immediate upgrade is not possible, applications must reject session identifiers that are not non-empty strings. Session identifiers should be derived from an authenticated, server-controlled value and must not be passed directly from an untrusted request field.

Upgrading remains the recommended remediation.

原文依据