CVE-2025-68665 (GCVE-0-2025-68665)
Vulnerability from cvelistv5
Published
2025-12-23 22:56
Modified
2025-12-24 14:38
CWE
  • CWE-502 - Deserialization of Untrusted Data
Summary
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
Impacted products
Vendor Product Version
langchain-ai langchainjs Version: @langchain/core >= 1.0.0, < 1.1.8
Version: @langchain/core < 0.3.80
Version: langchain >= 1.0.0, < 1.2.3
Version: langchain < 0.3.37
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2025-68665",
                "options": [
                  {
                    "Exploitation": "poc"
                  },
                  {
                    "Automatable": "yes"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-12-24T14:38:36.252592Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-12-24T14:38:40.268Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "references": [
          {
            "tags": [
              "exploit"
            ],
            "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6"
          }
        ],
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "langchainjs",
          "vendor": "langchain-ai",
          "versions": [
            {
              "status": "affected",
              "version": "@langchain/core \u003e= 1.0.0, \u003c 1.1.8"
            },
            {
              "status": "affected",
              "version": "@langchain/core \u003c 0.3.80"
            },
            {
              "status": "affected",
              "version": "langchain \u003e= 1.0.0, \u003c 1.2.3"
            },
            {
              "status": "affected",
              "version": "langchain \u003c 0.3.37"
            }
          ]
        }
      ],
      "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\u0027s toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with \u0027lc\u0027 keys when serializing free-form data in kwargs. The \u0027lc\u0027 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"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 8.6,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "NONE",
            "privilegesRequired": "NONE",
            "scope": "CHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-502",
              "description": "CWE-502: Deserialization of Untrusted Data",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-12-23T22:56:04.837Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6"
        },
        {
          "name": "https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62"
        },
        {
          "name": "https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8"
        },
        {
          "name": "https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3"
        }
      ],
      "source": {
        "advisory": "GHSA-r399-636x-v7f6",
        "discovery": "UNKNOWN"
      },
      "title": "LangChain serialization injection vulnerability enables secret extraction"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2025-68665",
    "datePublished": "2025-12-23T22:56:04.837Z",
    "dateReserved": "2025-12-22T23:28:02.917Z",
    "dateUpdated": "2025-12-24T14:38:40.268Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-68665\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2025-12-23T23:15:45.097\",\"lastModified\":\"2025-12-24T15:16:02.797\",\"vulnStatus\":\"Received\",\"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\u0027s toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with \u0027lc\u0027 keys when serializing free-form data in kwargs. The \u0027lc\u0027 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\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"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}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-502\"}]}],\"references\":[{\"url\":\"https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6\",\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\"}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2025-68665\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"poc\"}, {\"Automatable\": \"yes\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2025-12-24T14:38:36.252592Z\"}}}], \"references\": [{\"url\": \"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6\", \"tags\": [\"exploit\"]}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2025-12-24T14:38:27.420Z\"}}], \"cna\": {\"title\": \"LangChain serialization injection vulnerability enables secret extraction\", \"source\": {\"advisory\": \"GHSA-r399-636x-v7f6\", \"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"cvssV3_1\": {\"scope\": \"CHANGED\", \"version\": \"3.1\", \"baseScore\": 8.6, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N\", \"integrityImpact\": \"NONE\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"NONE\", \"privilegesRequired\": \"NONE\", \"confidentialityImpact\": \"HIGH\"}}], \"affected\": [{\"vendor\": \"langchain-ai\", \"product\": \"langchainjs\", \"versions\": [{\"status\": \"affected\", \"version\": \"@langchain/core \u003e= 1.0.0, \u003c 1.1.8\"}, {\"status\": \"affected\", \"version\": \"@langchain/core \u003c 0.3.80\"}, {\"status\": \"affected\", \"version\": \"langchain \u003e= 1.0.0, \u003c 1.2.3\"}, {\"status\": \"affected\", \"version\": \"langchain \u003c 0.3.37\"}]}], \"references\": [{\"url\": \"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6\", \"name\": \"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6\", \"tags\": [\"x_refsource_CONFIRM\"]}, {\"url\": \"https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62\", \"name\": \"https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8\", \"name\": \"https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3\", \"name\": \"https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3\", \"tags\": [\"x_refsource_MISC\"]}], \"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\u0027s toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with \u0027lc\u0027 keys when serializing free-form data in kwargs. The \u0027lc\u0027 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\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-502\", \"description\": \"CWE-502: Deserialization of Untrusted Data\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2025-12-23T22:56:04.837Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2025-68665\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-12-24T14:38:40.268Z\", \"dateReserved\": \"2025-12-22T23:28:02.917Z\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"datePublished\": \"2025-12-23T22:56:04.837Z\", \"assignerShortName\": \"GitHub_M\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…