<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://vulnerability.circl.lu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Wed, 30 Sep 2026 15:20:37 +0000</lastBuildDate>
    <item>
      <title>GHSA-r399-636x-v7f6 — LangChain serialization injection vulnerability enables secret extraction</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-r399-636x-v7f6</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: @langchain/core, npm: langchain&lt;/p&gt;
&lt;p&gt;## Context&lt;/p&gt;
&lt;p&gt;A serialization injection vulnerability exists in LangChain JS&amp;#39;s `toJSON()` method (and subsequently when string-ifying objects using `JSON.stringify()`. The method did not escape objects with `&amp;#39;lc&amp;#39;` keys when serializing free-form data in kwargs. The `&amp;#39;lc&amp;#39;` 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.&lt;/p&gt;
&lt;p&gt;### Attack surface&lt;/p&gt;
&lt;p&gt;The core vulnerability was in `Serializable.toJSON()`: this method failed to escape user-controlled objects containing `&amp;#39;lc&amp;#39;` keys within kwargs (e.g., `additional_kwargs`, `metadata`, `response_metadata`). When this unescaped data was later deserialized via `load()`, the injected structures were treated as legitimate LangChain objects rather than plain user data.&lt;/p&gt;
&lt;p&gt;This escaping bug enabled several attack vectors:&lt;/p&gt;
&lt;p&gt;1. **Injection via user data**: Malicious LangChain object structures could be injected through user-controlled fields like `metadata`, `additional_kwargs`, or `response_metadata`
2. **Secret extraction**: Injected secret structures could extract environment variables when `secretsFromEnv` was enabled (which had no explicit default, effectively defaulting to `true` behavior)
3. **Class instantiation via import maps**: Injected constructor structures could instantiate any class available in the provided import maps with attacker-controlled parameters&lt;/p&gt;
&lt;p&gt;**Note on imp…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: @langchain/core, npm: langchain&lt;/p&gt;
&lt;p&gt;## Context&lt;/p&gt;
&lt;p&gt;A serialization injection vulnerability exists in LangChain JS&amp;#39;s `toJSON()` method (and subsequently when string-ifying objects using `JSON.stringify()`. The method did not escape objects with `&amp;#39;lc&amp;#39;` keys when serializing free-form data in kwargs. The `&amp;#39;lc&amp;#39;` 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.&lt;/p&gt;
&lt;p&gt;### Attack surface&lt;/p&gt;
&lt;p&gt;The core vulnerability was in `Serializable.toJSON()`: this method failed to escape user-controlled objects containing `&amp;#39;lc&amp;#39;` keys within kwargs (e.g., `additional_kwargs`, `metadata`, `response_metadata`). When this unescaped data was later deserialized via `load()`, the injected structures were treated as legitimate LangChain objects rather than plain user data.&lt;/p&gt;
&lt;p&gt;This escaping bug enabled several attack vectors:&lt;/p&gt;
&lt;p&gt;1. **Injection via user data**: Malicious LangChain object structures could be injected through user-controlled fields like `metadata`, `additional_kwargs`, or `response_metadata`
2. **Secret extraction**: Injected secret structures could extract environment variables when `secretsFromEnv` was enabled (which had no explicit default, effectively defaulting to `true` behavior)
3. **Class instantiation via import maps**: Injected constructor structures could instantiate any class available in the provided import maps with attacker-controlled parameters&lt;/p&gt;
&lt;p&gt;**Note on imp…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-r399-636x-v7f6</guid>
    </item>
  </channel>
</rss>
