Vulnerability library
Security checkFebruary 20, 2026

LangChain serialization injection vulnerability enables secret extraction - @langchain/core

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpm@langchain/core

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

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:

  • Affected version(s): **< 0.3.80 >= 1.0.0, < 1.1.8**
  • Patched version(s): **0.3.80 1.1.8**

References

Could your website be exposed too?

SmartScanner can check your website for LangChain serialization injection vulnerability enables secret extraction - @langchain/core and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated February 20, 2026