CVE-2025-68665

Source
https://cve.org/CVERecord?id=CVE-2025-68665
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-68665.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-68665
Aliases
Downstream
CGA (112)
CLEANSTART (2)
MINI (9)
ROOT (1)
Published
2025-12-23T22:56:04Z
Modified
2026-10-16T02:58:05Z
Severity
  • 8.6 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N CVSS Calculator
Summary
LangChain serialization injection vulnerability enables secret extraction
Details

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

Database specific
{
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-502"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68665.json",
    "unresolved_ranges": [
        {
            "extracted_events": [
                {
                    "range": [
                        {
                            "introduced": "@langchain/core >= 1.0.0, < 1.1.8"
                        },
                        {
                            "last_affected": "@langchain/core >= 1.0.0, < 1.1.8"
                        },
                        {
                            "introduced": "langchain >= 1.0.0, < 1.2.3"
                        },
                        {
                            "last_affected": "langchain >= 1.0.0, < 1.2.3"
                        },
                        {
                            "introduced": "langchain < 0.3.37"
                        },
                        {
                            "last_affected": "langchain < 0.3.37"
                        }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                }
            ]
        }
    ]
}
References

Affected packages

Git / github.com/langchain-ai/langchainjs

Affected ranges

Type
GIT
Repo
https://github.com/langchain-ai/langchainjs
Events
Database specific
Show details
{
    "extracted_events": [
        {
            "range": [
                {
                    "introduced": "@langchain/core < 0.3.80"
                },
                {
                    "last_affected": "@langchain/core < 0.3.80"
                }
            ],
            "source": "AFFECTED_FIELD",
            "strategy": "StandaloneSingleVersion"
        },
        {
            "range": [
                {
                    "fixed": "e5063f9c6e9989ea067dfdff39262b9e7b6aba62"
                }
            ],
            "source": "REFERENCES_COMMIT"
        },
        {
            "original_tag": "langchain@1.2.3",
            "range": [
                {
                    "fixed": "de32b32b0b4bbd4ce2445e3044dd8011b3a78b30"
                }
            ],
            "source": "REFERENCES_TAG"
        }
    ]
}

Affected versions

@langchain/core < 0.*
@langchain/core < 0.3.80

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-68665.json"