CVE-2025-68665
High · 8.6LangChain serialization injection vulnerability enables secret extraction
CVSS
8.6
EPSS
0.8%
Published
Dec 23, 2025
CISA due date
—
The record
Attackers who control serialized data can extract environment variable secrets by injecting `{"lc": 1, "type": "secret", "id": ["ENV_VAR"]}` to load environment variables during deserialization (when `secretsFromEnv: true`). They can also instantiate classes with controlled parameters by injecting constructor structures to instantiate any class within the provided import maps with attacker-controlled parameters, potentially triggering side effects such as network calls or file operations. Key severity factors: - Affects the serialization path—applications trusting their own serialization output are vulnerable - Enables secret extraction when combined with `secretsFromEnv: true` - LLM responses in `additional_kwargs` can be controlled via prompt injection
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | @langchain/core | 0 | 0.3.80 |
| npm | @langchain/core | 1.0.0 | 1.1.8 |
| npm | langchain | 0 | 0.3.37 |
| npm | langchain | 1.0.0 | 1.2.3 |
| Chainguard | kibana-8.17 | 0 | 8.17.10-r6 |
| Chainguard | kibana-8.17-bitnami | 0 | 8.17.10-r6 |
| Chainguard | kibana-8.17-iamguarded | 0 | 8.17.10-r6 |
| Chainguard | kibana-8.18 | 0 | 8.18.8-r6 |
| Chainguard | kibana-8.18-bitnami | 0 | 8.18.8-r6 |
| Chainguard | kibana-8.18-iamguarded | 0 | 8.18.8-r6 |
| Chainguard | kibana-8.19 | 0 | 8.19.9-r2 |
| Chainguard | kibana-8.19-bitnami | 0 | 8.19.9-r2 |
| Chainguard | kibana-8.19-iamguarded | 0 | 8.19.9-r2 |
| Chainguard | kibana-9.0 | 0 | 9.0.8-r5 |
| Chainguard | kibana-9.0-bitnami | 0 | 9.0.8-r5 |
| Chainguard | kibana-9.0-iamguarded | 0 | 9.0.8-r5 |
| Chainguard | kibana-9.1 | 0 | 9.1.9-r1 |
| Chainguard | kibana-9.1-bitnami | 0 | 9.1.9-r1 |
| Chainguard | kibana-9.1-iamguarded | 0 | 9.1.9-r1 |
| Chainguard | kibana-9.2 | 0 | 9.2.3-r1 |
| Chainguard | kibana-9.2-iamguarded | 0 | 9.2.3-r1 |
| Chainguard | langfuse-2 | 0 | 2.95.12-r4 |
| Chainguard | langfuse-2-compat | 0 | 2.95.12-r4 |
| Chainguard | langfuse-2-worker | 0 | 2.95.12-r4 |
| Chainguard | langfuse-fips-2 | 0 | 2.95.12-r4 |
| Chainguard | langfuse-fips-2-compat | 0 | 2.95.12-r4 |
| Chainguard | langfuse-fips-2-worker | 0 | 2.95.12-r4 |
| Chainguard | librechat | 0 | 0.8.1-r1 |
| Chainguard | librechat-compat | 0 | 0.8.1-r1 |
| Chainguard | librechat-dev | 0 | 0.8.1-r1 |
Related vulnerabilities
- GHSA-r399-636x-v7f6 LangChain serialization injection vulnerability enables secret extraction Same vulnerability
- GHSA-7rx3-28cr-v5wh Handlebars.js has a Prototype Method Access Control Gap via Missing __lookupSetter__… Also affects kibana-8.17
- GHSA-442j-39wm-28r2 Handlebars.js has a Property Access Validation Bypass in container.lookup Also affects kibana-8.17
- CVE-2026-33940 Handlebars provides the power necessary to let users build semantic templates. Also affects kibana-8.17
- CVE-2026-33941 Handlebars provides the power necessary to let users build semantic templates. Also affects kibana-8.17
- CVE-2026-33939 Handlebars provides the power necessary to let users build semantic templates. Also affects kibana-8.17
- CVE-2026-33937 Handlebars provides the power necessary to let users build semantic templates. Also affects kibana-8.17
- CVE-2026-33938 Handlebars provides the power necessary to let users build semantic templates. Also affects kibana-8.17