{"id":9493,"date":"2025-12-26T10:03:52","date_gmt":"2025-12-26T10:03:52","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/12\/26\/critical-langchain-vulnerability-let-attackers-exfiltrate-sensitive-secrets-from-ai-systems\/"},"modified":"2025-12-26T10:03:52","modified_gmt":"2025-12-26T10:03:52","slug":"critical-langchain-vulnerability-let-attackers-exfiltrate-sensitive-secrets-from-ai-systems","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/12\/26\/critical-langchain-vulnerability-let-attackers-exfiltrate-sensitive-secrets-from-ai-systems\/","title":{"rendered":"Critical Langchain Vulnerability Let attackers Exfiltrate Sensitive Secrets from AI systems"},"content":{"rendered":"<p>    Critical Langchain Vulnerability Let attackers Exfiltrate Sensitive Secrets from AI systems<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A critical vulnerability in LangChain\u2019s core library (CVE-2025-68664) allows attackers to exfiltrate sensitive environment variables and potentially execute code through deserialization flaws.<\/p>\n<p>Discovered by a Cyata researcher and patched just before Christmas 2025, the issue affects one of the most popular AI frameworks with hundreds of millions of downloads.\u200b<\/p>\n<p>LangChain-core\u2019s dumps() and dumpd() functions failed to escape user-controlled dictionaries containing the reserved \u2018lc\u2019 key, which marks internal serialized objects.<\/p>\n<p>This led to deserialization of untrusted data (CWE-502) when LLM outputs or prompt injections influenced fields like additional_kwargs or response_metadata, triggering serialization-deserialization cycles in common flows such as event streaming, logging, and caching. A CNA-assigned CVSS score of 9.3 rates it Critical, with 12 vulnerable patterns identified, including astream_events(v1) and Runnable.astream_log().\u200b<\/p>\n<p>Cyata security researcher <a href=\"https:\/\/cyata.ai\/blog\/langgrinch-langchain-core-cve-2025-68664\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">uncovered<\/a> the flaw during audits of AI trust boundaries, spotting the missing escape in serialization code after tracing deserialization sinks.<\/p>\n<p>Reported via Huntr on December 4, 2025, LangChain acknowledged it the next day and published the <a href=\"https:\/\/github.com\/langchain-ai\/langchain\/security\/advisories\/GHSA-c67j-w6g6-q2cm\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">advisory<\/a> on December 24. Patches rolled out in langchain-core versions 0.3.81 and 1.2.5, which wrap \u2018lc\u2019-containing dicts and disable secrets_from_env by default\u2014previously enabled, allowing direct env var leaks. The team awarded a record $4,000 bounty.\u200b<\/p>\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjIYX4iziSoBgzwhJEd3V1uhIg8QwFueLfZnTXla5nRVGKZw0k2Zj0lTGHMT8uxQ0KQpnxNAfAu375yf2IWbAftQ1TosFr_8k4Z9McvAwKgxXGNNCYGZnkpK8NzgImtBqZIJlmndOb_yi5yjN4IOCMrPbr5gx3FoZ5ku8U05EAapKk9DiDVb1BQN1aWH1s9\/s16000\/image-2.webp?ssl=1\" alt=\"\"><\/figure>\n<p>Attackers could craft prompts to instantiate allowlisted classes like ChatBedrockConverse from langchain_aws, triggering <a href=\"https:\/\/cybersecuritynews.com\/tag\/ssrf-vulnerability\/\" target=\"_blank\" rel=\"noreferrer noopener\">SSRF<\/a> with env vars in headers for exfiltration.<\/p>\n<p>PromptTemplate enables Jinja2 rendering for possible RCE if invoked post-deserialization. LangChain\u2019s scale amplifies risk: pepy.tech logs ~847M total downloads, pypistats ~98M last month.\u200b<\/p>\n<p>Upgrade langchain-core immediately and verify dependencies like langchain-community. Treat LLM outputs as untrusted, audit deserialization in streaming\/logs, and disable secret resolution unless inputs are verified. A parallel flaw hit LangChainJS (CVE-2025-68665), underscoring risks in agentic AI plumbing.\u200b<\/p>\n<p>Organizations must inventory agent deployments for swift triage amid booming LLM app adoption.\u200b<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 94%,rgb(169,184,195) 100%)\"><strong>Follow us on <a href=\"https:\/\/news.google.com\/publications\/CAAqMggKIixDQklTR3dnTWFoY0tGV041WW1WeWMyVmpkWEpwZEhsdVpYZHpMbU52YlNnQVAB?hl=en-IN&amp;gl=IN&amp;ceid=IN:en\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google News<\/a>, <a href=\"https:\/\/www.linkedin.com\/company\/cybersecurity-news\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">LinkedIn<\/a>, and <a href=\"https:\/\/x.com\/cyber_press_org\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">X<\/a> for daily cybersecurity updates. <a href=\"https:\/\/cybersecuritynews.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Contact us<\/a> to feature your stories.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/langchain-vulnerability\/\">Critical Langchain Vulnerability Let attackers Exfiltrate Sensitive Secrets from AI systems<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Guru Baran<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/langchain-vulnerability\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Critical Langchain Vulnerability Let attackers Exfiltrate Sensitive Secrets from AI systems A critical vulnerability in LangChain\u2019s core library (CVE-2025-68664) allows attackers to exfiltrate sensitive environment variables and potentially execute code through deserialization flaws. Discovered by a Cyata researcher and patched just before Christmas 2025, the issue affects one of the most popular AI frameworks with [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,648],"tags":[130],"class_list":["post-9493","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-vulnerability-news","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/9493"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=9493"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/9493\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=9493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=9493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=9493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}