Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-97869 Overview
CVE-2026-97869 is an insecure deserialization vulnerability in the LangChain4j agentic module. The flaw affects langchain4j versions up to 1.5.3-beta10, 1.11.10-beta18, and 1.18.1-beta27. The vulnerable code path resides in AgenticScopeSerializer.fromJson, exercised by the AgenticScopeJsonSerializationIT.java integration test. Jackson default typing allows arbitrary class instantiation when deserializing attacker-controlled JSON. Exploitation requires an application to opt into AgenticScope persistence and an attacker who can already write to that store, which limits practical attack scenarios. The maintainers patched all supported release lines in versions 1.5.3-beta11, 1.11.10-beta19, and 1.18.1-beta28.
Critical Impact
An attacker with write access to the AgenticScope persistence store can trigger arbitrary Java class instantiation during deserialization, potentially leading to code execution within the host application.
Affected Products
- LangChain4j langchain4j-agentic versions up to and including 1.5.3-beta10
- LangChain4j langchain4j-agentic versions up to and including 1.11.10-beta18
- LangChain4j langchain4j-agentic versions up to and including 1.18.1-beta27
Discovery Timeline
- 2026-07-23 - Vulnerability privately reported to the LangChain4j maintainers
- 2026-07-29 - Fixed releases published by the LangChain4j project
- 2026-09-25 - CVE-2026-97869 published to NVD
- 2026-09-28 - Last updated in NVD database
Technical Details for CVE-2026-97869
Vulnerability Analysis
The weakness falls under [CWE-20: Improper Input Validation] and manifests as an insecure deserialization issue. LangChain4j's agentic module uses Jackson with default typing enabled when restoring an AgenticScope object from JSON. Default typing instructs Jackson to honor the @class type hints embedded in the serialized payload. During AgenticScopeSerializer.fromJson, Jackson instantiates whatever classes the payload declares, bypassing the normal type-driven validation.
Exploitation is gated by two preconditions. The target application must enable the optional AgenticScope persistence feature, and the attacker must already hold write access to the backing store. These constraints raise the attack complexity but do not neutralize the primitive once reached.
Root Cause
The root cause is the use of Jackson's polymorphic default typing on untrusted input. When default typing is enabled, Jackson resolves class names supplied by the caller and invokes their constructors or setters. Any class on the classpath with exploitable deserialization gadgets becomes reachable through a crafted JSON document.
Attack Vector
An attacker with write access to the persistence layer stores a malicious JSON document representing an AgenticScope. When the application later restores that scope, AgenticScopeSerializer.fromJson deserializes the payload and instantiates attacker-chosen classes. If a gadget chain exists in the application's dependencies, this results in arbitrary code execution in the context of the host process.
See the GitHub Security Advisory GHSA-gmwr-7wmf-mrjm and the published GitHub PoC for CVE-2026-97869 for the proof-of-concept payload structure.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-97869
Indicators of Compromise
- JSON documents in the AgenticScope persistence store containing Jackson type hints such as @class or @type referencing unexpected classes
- Unexpected class loading events for java.*, javax.*, or third-party gadget classes originating from the LangChain4j agentic process
- Child processes or outbound network connections spawned by a Java application immediately after reading an AgenticScope record
Detection Strategies
- Audit application dependencies for langchain4j-agentic at vulnerable versions and flag any build that imports them
- Inspect runtime calls to AgenticScopeSerializer.fromJson and log the deserialized root type for anomaly review
- Correlate writes to the AgenticScope store with the identity performing the write to surface unauthorized actors
Monitoring Recommendations
- Enable Java process telemetry on hosts running LangChain4j workloads to capture child process creation and class-loader activity
- Monitor the backing persistence store (database, object storage, filesystem) for write operations outside normal application flows
- Alert on egress traffic initiated by the JVM following AgenticScope restore events
How to Mitigate CVE-2026-97869
Immediate Actions Required
- Upgrade langchain4j-agentic to 1.5.3-beta11, 1.11.10-beta19, or 1.18.1-beta28 depending on the release line in use
- Review and restrict write access to any AgenticScope persistence backend to trusted service identities only
- If persistence is not required, disable the AgenticScope persistence feature until the upgrade is deployed
Patch Information
The LangChain4j maintainers tracked the issue as GHSA-gmwr-7wmf-mrjm and shipped fixes on 29 July 2026 across all maintained release lines. Verified releases are 1.5.3-beta11, 1.11.10-beta19, and 1.18.1-beta28. Build artifacts are available from the LangChain4j Repository and the LangChain4j Release 1.18.1 notes.
Workarounds
- Disable AgenticScope persistence in application configuration where feasible
- Place the persistence store behind strict access controls so no untrusted principal can write to it
- Validate stored AgenticScope payloads against an allowlist of expected class names before invoking the deserializer
# Maven dependency upgrade example
# Update your pom.xml to a patched version
# <dependency>
# <groupId>dev.langchain4j</groupId>
# <artifactId>langchain4j-agentic</artifactId>
# <version>1.18.1-beta28</version>
# </dependency>
mvn versions:set-property -Dproperty=langchain4j.version -DnewVersion=1.18.1-beta28
mvn clean verify
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

