Vulnerabilities/

LangChain serialization injection vulnerability enables secret extraction (GHSA-r399-636x-v7f6)

Severity:
High

Description

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.

Recommendation

Update the @langchain/core package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
@langchain/core
Anything's wrong? Let us know Last updated on December 24, 2025