← Back to CVE Explorer

CVE-2025-68664

Full vulnerability record from the local CVENow database.

Description

LangChain is a framework for building agents and LLM-powered applications. Prior to versions 0.3.81 and 1.2.5, 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. This issue has been patched in versions 0.3.81 and 1.2.5.

Severity
HIGH
CVSS score
8.2 (v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2025-12-23 23:15:44.933000
Last modified
2026-10-19 22:10:00.130000
View original CVE JSON
{
  "id": "CVE-2025-68664",
  "sourceIdentifier": "[email protected]",
  "published": "2025-12-23T23:15:44.933",
  "lastModified": "2026-10-19T22:10:00.130",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "LangChain is a framework for building agents and LLM-powered applications. Prior to versions 0.3.81 and 1.2.5, 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. This issue has been patched in versions 0.3.81 and 1.2.5."
    },
    {
      "lang": "es",
      "value": "LangChain es un framework para construir agentes y aplicaciones impulsadas por LLM. Versiones anteriores a 0.3.81 y 1.2.5, una vulnerabilidad de inyección de serialización existe en las funciones dumps() y dumpd() de LangChain. Las funciones no escapan los diccionarios con claves ’lc’ al serializar diccionarios de formato libre. 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 ha sido corregido en las versiones 0.3.81 y 1.2.5."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "langchain-ai",
          "product": "langchain",
          "versions": [
            {
              "version": ">= 1.0.0, < 1.2.5",
              "status": "affected"
            },
            {
              "version": "< 0.3.81",
              "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:L/A:N",
          "baseScore": 9.3,
          "baseSeverity": "CRITICAL",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "CHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "LOW",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 4.7
      },
      {
        "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:L/A:N",
          "baseScore": 8.2,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "LOW",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 4.2
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2025-12-24T14:40:55.506059Z",
          "id": "CVE-2025-68664",
          "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_core:*:*:*:*:*:python:*:*",
              "versionEndExcluding": "0.3.81",
              "matchCriteriaId": "DC184324-6CF1-4F7A-B87F-6DD2120C3B3B"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:*",
              "versionStartIncluding": "1.0.0",
              "versionEndExcluding": "1.2.5",
              "matchCriteriaId": "4298E953-ED96-49EC-8474-86095D560F2B"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/langchain-ai/langchain/commit/5ec0fa69de31bbe3d76e4cf9cd65a6accb8466c8",
      "source": "[email protected]",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchain/commit/d9ec4c5cc78960abd37da79b0250f5642e6f0ce6",
      "source": "[email protected]",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchain/pull/34455",
      "source": "[email protected]",
      "tags": [
        "Issue Tracking",
        "Patch"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchain/pull/34458",
      "source": "[email protected]",
      "tags": [
        "Issue Tracking",
        "Patch"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.81",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.5",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchain/security/advisories/GHSA-c67j-w6g6-q2cm",
      "source": "[email protected]",
      "tags": [
        "Exploit",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://github.com/langchain-ai/langchain/security/advisories/GHSA-c67j-w6g6-q2cm",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Exploit",
        "Vendor Advisory"
      ]
    }
  ]
}