← Back to CVE Explorer

CVE-2025-68665

Full vulnerability record from the local CVENow database.

Description

LangChain is a framework for building LLM-powered applications. Prior to @langchain/core versions 0.3.80 and 1.1.8, and prior to langchain versions 0.3.37 and 1.2.3, a serialization injection vulnerability exists in LangChain JS's toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with 'lc' keys when serializing free-form data in kwargs. 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. This issue has been patched in @langchain/core versions 0.3.80 and 1.1.8, and langchain versions 0.3.37 and 1.2.3

Severity
CRITICAL
CVSS score
9.1 (v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2025-12-23 23:15:45.097000
Last modified
2026-10-19 22:10:00.130000
View original CVE JSON
{
  "id": "CVE-2025-68665",
  "sourceIdentifier": "[email protected]",
  "published": "2025-12-23T23:15:45.097",
  "lastModified": "2026-10-19T22:10:00.130",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "LangChain is a framework for building LLM-powered applications. Prior to @langchain/core versions 0.3.80 and 1.1.8, and prior to langchain versions 0.3.37 and 1.2.3, a serialization injection vulnerability exists in LangChain JS's toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with 'lc' keys when serializing free-form data in kwargs. 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. This issue has been patched in @langchain/core versions 0.3.80 and 1.1.8, and langchain versions 0.3.37 and 1.2.3"
    },
    {
      "lang": "es",
      "value": "LangChain es un framework para crear aplicaciones impulsadas por LLM. Versiones anteriores a @langchain/core 0.3.80 y 1.1.8, y versiones anteriores a langchain 0.3.37 y 1.2.3, existe una vulnerabilidad de inyección de serialización en el método toJSON() de LangChain JS (y posteriormente al convertir objetos a cadena usando JSON.stringify()). El método no escapaba los objetos con claves ’lc’ al serializar datos de formato libre en kwargs. La clave ’lc’ se usa internamente en LangChain para marcar objetos serializados. Cuando datos controlados por el usuario contienen esta estructura de clave, se trata como un objeto legítimo de LangChain durante la deserialización en lugar de datos de usuario simples. Este problema se ha corregido en las versiones @langchain/core 0.3.80 y 1.1.8, y langchain 0.3.37 y 1.2.3."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "langchain-ai",
          "product": "langchainjs",
          "versions": [
            {
              "version": "@langchain/core >= 1.0.0, < 1.1.8",
              "status": "affected"
            },
            {
              "version": "@langchain/core < 0.3.80",
              "status": "affected"
            },
            {
              "version": "langchain >= 1.0.0, < 1.2.3",
              "status": "affected"
            },
            {
              "version": "langchain < 0.3.37",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N",
          "baseScore": 8.6,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "CHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "NONE",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 4.0
      },
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
          "baseScore": 9.1,
          "baseSeverity": "CRITICAL",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 5.2
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2025-12-24T14:38:36.252592Z",
          "id": "CVE-2025-68665",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-502"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:langchain:langchain.js:*:*:*:*:*:*:*:*",
              "versionEndExcluding": "0.3.37",
              "matchCriteriaId": "79F6F9C9-7927-4C72-9F8F-63186F6D59A2"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:langchain:langchain.js:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "1.0.0",
              "versionEndExcluding": "1.2.3",
              "matchCriteriaId": "32341D52-B3FD-484F-940F-CB8EB24CFB43"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:langchain:langchain\\/core:*:*:*:*:*:node.js:*:*",
              "versionEndExcluding": "0.3.80",
              "matchCriteriaId": "7D44DA1A-0433-4A46-8E85-D8363F1E5C99"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:langchain:langchain\\/core:*:*:*:*:*:node.js:*:*",
              "versionStartIncluding": "1.0.0",
              "versionEndExcluding": "1.1.8",
              "matchCriteriaId": "CECC1942-DCA4-42B5-B9C1-E2F420B27D9A"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62",
      "source": "[email protected]",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6",
      "source": "[email protected]",
      "tags": [
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Vendor Advisory"
      ]
    }
  ]
}