{"answers":{"affected":"5 open source packages ship an affected version, including langchain-core. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-68664 exists.","fix":"Upgrade langchain-core to a fixed version for your release line: 0.3.81 or 1.2.5.","what":"CVE-2025-68664 is a critical unsafe deserialization vulnerability in langchain-ai langchain, 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-68664 and fix it if it is affected.\n\nWhat it is: CVE-2025-68664 is a critical unsafe deserialization vulnerability in langchain-ai langchain, 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-68664 exists.\n\nAffected packages and fixed versions:\n- langchain-core (PyPI): affected all versions; fixed in 0.3.81, 1.2.5\n- langchain-core (PyPI): affected all versions; fixed in 0.3.81\n- langchain-core (PyPI): affected all versions; fixed in 0.3.81\n- langchain-core (PyPI): affected from 1.0.0; fixed in 1.2.5\n- langchain-core (PyPI): affected from 1.0.0; fixed in 1.2.5\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-68664/ (Markdown: https://insights.sbomify.com/CVE-2025-68664/index.md)","id":"CVE-2025-68664","markdown":"https://insights.sbomify.com/CVE-2025-68664/index.md","name":"CVE-2025-68664","record":{"aliases":["ECHO-fb5a-79b4-ed97","GHSA-c67j-w6g6-q2cm","MINI-g399-jhx6-775w","PYSEC-2026-373","ROOT-APP-PYPI-CVE-2025-68664"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"LangChain Python library","requires_auth":"none","summary":"Attackers can inject malicious objects via serialization APIs to execute code or extract secrets in LangChain applications.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"langchain_core","vendor":"langchain"}],"cvss":{"score":9.3,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":1,"first_seen":"2025-12-27","github_poc":4,"max_poc_stars":3,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-12-27T06:49:55Z","kind":"github_poc","ref":"https://github.com/Ak-cybe/CVE-2025-68664-LangGrinch-PoC","stars":3,"title":"A testing framework to identify and demonstrate deserialization vulnerabilities in LangChain Core (\u003c0.3.81). Educational use only"},{"date":"2026-01-10T21:54:32Z","kind":"github_poc","ref":"https://github.com/comerc/CVE-2025-68664","stars":0,"title":null},{"date":"2026-04-29","kind":"exploitdb","ref":"52514","stars":null,"title":"LangChain Core 1.2.4 - SSTI/RCE"},{"date":"2026-05-10T06:42:37Z","kind":"github_poc","ref":"https://github.com/Johnnyzhou666/langgrinch-cve-2025-68664-analysis","stars":0,"title":"Technical analysis of the LangChain serialization injection vulnerability CVE-2025-68664."},{"date":"2026-09-06T10:26:08Z","kind":"github_poc","ref":"https://github.com/t-sorger/cve-2025-68664-langgrinch","stars":0,"title":"LangGrinch - CVE-2025-68664 demo"}],"tier":"weaponised"},"has_fix":true,"headline":"LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs","id":"CVE-2025-68664","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"deserialization","year":"2025"},"n_packages":5,"n_references":7,"next":{"headline":"LangChain serialization injection vulnerability enables secret extraction","id":"CVE-2025-68665"},"packages":[{"ecosystem":"PyPI","fixed":["0.3.81","1.2.5"],"introduced":["0","1.0.0"],"last_affected":[],"package":"langchain-core","purl":"pkg:pypi/langchain-core","source":"PYSEC-2026-373"},{"ecosystem":"PyPI","fixed":["0.3.81"],"introduced":["0"],"last_affected":[],"package":"langchain-core","purl":null,"source":"GHSA-c67j-w6g6-q2cm"},{"ecosystem":"PyPI","fixed":["0.3.81"],"introduced":["0"],"last_affected":[],"package":"langchain-core","purl":"pkg:pypi/langchain-core","source":"GHSA-c67j-w6g6-q2cm"},{"ecosystem":"PyPI","fixed":["1.2.5"],"introduced":["1.0.0"],"last_affected":[],"package":"langchain-core","purl":null,"source":"GHSA-c67j-w6g6-q2cm"},{"ecosystem":"PyPI","fixed":["1.2.5"],"introduced":["1.0.0"],"last_affected":[],"package":"langchain-core","purl":"pkg:pypi/langchain-core","source":"GHSA-c67j-w6g6-q2cm"}],"prev":{"headline":"Outline has a suspended user authentication bypass via WebSocket connections","id":"CVE-2025-68663"},"products":["langchain"],"published":"2025-12-23","related":[{"cvss_score":7.5,"headline":"LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions","id":"CVE-2026-34070","kev_date_added":null,"published":"2026-03-31"},{"cvss_score":5.3,"headline":"LangChain has incomplete f-string validation in prompt templates","id":"CVE-2026-40087","kev_date_added":null,"published":"2026-04-09"},{"cvss_score":3.7,"headline":"LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages","id":"CVE-2026-26013","kev_date_added":null,"published":"2026-02-10"}],"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":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"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)"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-12-24","vendors":["langchain-ai"]},"summary":"Attackers can inject malicious objects via serialization APIs to execute code or extract secrets in LangChain applications.","url":"https://insights.sbomify.com/CVE-2025-68664/"}