{"answers":{"affected":"8 open source packages ship an affected version, including @langchain/core and langchain. It affects 2 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-68665 exists.","fix":"Upgrade @langchain/core to a fixed version for your release line: 0.3.80 or 1.1.8.","what":"CVE-2025-68665 is a high-severity unsafe deserialization vulnerability in langchain-ai langchainjs, published on 23 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-68665 and fix it if it is affected.\n\nWhat it is: CVE-2025-68665 is a high-severity unsafe deserialization vulnerability in langchain-ai langchainjs, published on 23 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-68665 exists.\n\nAffected packages and fixed versions:\n- @langchain/core (npm): affected all versions; fixed in 0.3.80\n- @langchain/core (npm): affected all versions; fixed in 0.3.80\n- @langchain/core (npm): affected from 1.0.0; fixed in 1.1.8\n- @langchain/core (npm): affected from 1.0.0; fixed in 1.1.8\n- langchain (npm): affected all versions; fixed in 0.3.37\n- langchain (npm): affected all versions; fixed in 0.3.37\n- langchain (npm): affected from 1.0.0; fixed in 1.2.3\n- langchain (npm): affected from 1.0.0; fixed in 1.2.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-68665/ (Markdown: https://insights.sbomify.com/CVE-2025-68665/index.md)","id":"CVE-2025-68665","markdown":"https://insights.sbomify.com/CVE-2025-68665/index.md","name":"CVE-2025-68665","record":{"aliases":["CLEANSTART-2026-CZ76970","CLEANSTART-2026-TX70118","ECHO-8c60-58c3-e7a5","GHSA-r399-636x-v7f6","MINI-2pfh-rpgg-45qm","MINI-8mhc-xcr8-5jf9","MINI-f8p8-cwrc-63p9","MINI-fcwp-2ggg-x29m","MINI-fhgx-3qx6-vwrr","MINI-j67g-8qwp-8v9q","MINI-m8qc-mf4g-qc2m","MINI-v4j9-q4xx-g62c","MINI-w68f-82vf-h2cc","ROOT-APP-NPM-CVE-2025-68665"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"LangChain JS library","requires_auth":"none","summary":"Attackers can inject malicious objects via user-controlled data to extract secrets or execute code during deserialization in LangChain JS.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"langchain.js","vendor":"langchain"},{"product":"langchain\\/core","vendor":"langchain"}],"cvss":{"score":8.6,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"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","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"LangChain serialization injection vulnerability enables secret extraction","id":"CVE-2025-68665","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"deserialization","year":"2025"},"n_packages":8,"n_references":4,"next":{"headline":"Discourse users archives leaked to users with moderation privileges","id":"CVE-2025-68666"},"packages":[{"ecosystem":"npm","fixed":["0.3.80"],"introduced":["0"],"last_affected":[],"package":"@langchain/core","purl":null,"source":"GHSA-r399-636x-v7f6"},{"ecosystem":"npm","fixed":["0.3.80"],"introduced":["0"],"last_affected":[],"package":"@langchain/core","purl":"pkg:npm/%40langchain/core","source":"GHSA-r399-636x-v7f6"},{"ecosystem":"npm","fixed":["1.1.8"],"introduced":["1.0.0"],"last_affected":[],"package":"@langchain/core","purl":null,"source":"GHSA-r399-636x-v7f6"},{"ecosystem":"npm","fixed":["1.1.8"],"introduced":["1.0.0"],"last_affected":[],"package":"@langchain/core","purl":"pkg:npm/%40langchain/core","source":"GHSA-r399-636x-v7f6"},{"ecosystem":"npm","fixed":["0.3.37"],"introduced":["0"],"last_affected":[],"package":"langchain","purl":null,"source":"GHSA-r399-636x-v7f6"},{"ecosystem":"npm","fixed":["0.3.37"],"introduced":["0"],"last_affected":[],"package":"langchain","purl":"pkg:npm/langchain","source":"GHSA-r399-636x-v7f6"},{"ecosystem":"npm","fixed":["1.2.3"],"introduced":["1.0.0"],"last_affected":[],"package":"langchain","purl":null,"source":"GHSA-r399-636x-v7f6"},{"ecosystem":"npm","fixed":["1.2.3"],"introduced":["1.0.0"],"last_affected":[],"package":"langchain","purl":"pkg:npm/langchain","source":"GHSA-r399-636x-v7f6"}],"prev":{"headline":"LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs","id":"CVE-2025-68664"},"products":["langchainjs"],"published":"2025-12-23","related":[{"cvss_score":6.5,"headline":"Path Traversal in langchain-ai/langchainjs","id":"CVE-2024-7774","kev_date_added":null,"published":"2024-10-29"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-12-24","vendors":["langchain-ai"]},"summary":"Attackers can inject malicious objects via user-controlled data to extract secrets or execute code during deserialization in LangChain JS.","url":"https://insights.sbomify.com/CVE-2025-68665/"}