Summary
OpenAM prior to 16.0.6 suffers from an unsafe Java deserialization flaw in the jato.clientSession HTTP parameter, allowing attacker-controlled serialized objects to be processed before authentication.
An unauthenticated attacker can send a crafted jato.clientSession value to JATO ViewBean endpoints with <jato:form> tags, potentially achieving remote code execution on the OpenAM server.
Affected context
This vulnerability appears in OpenIdentityPlatform OpenAM deployments that:
- Run versions prior to 16.0.6
- Expose JATO-based ViewBean endpoints over HTTP/HTTPS
- Include JSP pages using
<jato:form>tags (such as Password Reset and similar flows) - Accept and process the
jato.clientSessionGET/POST parameter as part of request handling
The risk is most pronounced where OpenAM is internet-facing or reachable from untrusted network segments, and where default or typical configurations are used without additional request filtering.
Exploit preconditions
- Attack surface: Any reachable JATO ViewBean endpoint whose JSP uses
<jato:form>tags (e.g., password reset pages) on a vulnerable OpenAM instance. - Required access: Network access to the OpenAM HTTP/HTTPS interface; no prior authentication or valid session is required.
- Trigger point: Server-side processing of the
jato.clientSessionHTTP parameter, supplied via GET or POST, leading to Java deserialization. - Why exploitation is possible: The server deserializes untrusted data from
jato.clientSessionusing a Java deserialization mechanism that is not properly constrained by the intended whitelist (unlike the previously hardenedjato.pageSessionparameter). This allows attacker-supplied object graphs to instantiate gadget chains that execute code during or after deserialization.
Why this happens
The underlying bug is an unsafe deserialization pattern where OpenAM treats the jato.clientSession request parameter as a serialized Java object to be restored into server memory.
Instead of limiting deserialization to a narrow set of safe types or using an alternative, non-deserialization-based encoding, the application passes attacker-controlled byte streams to the Java object deserialization API.
While a whitelist-based mitigation was previously applied to jato.pageSession following CVE-2021-35464, the analogous jato.clientSession parameter was not subject to the same enforcement.
This gap leaves a deserialization channel where arbitrary gadget types may be instantiated, matching CWE-502: Deserialization of Untrusted Data, in which untrusted inputs are interpreted as serialized objects and can trigger unintended behavior, including remote code execution.
Potential impact
- Remote execution of arbitrary commands or code on the OpenAM server host
- Complete compromise of the OpenAM instance, including access tokens, sessions, and identity data it manages
- Lateral movement into connected infrastructure using stolen credentials or issued tokens
- Tampering with authentication and authorization flows, potentially granting unauthorized access to integrated applications
- Service disruption or denial of service by crashing or destabilizing OpenAM processes
- Use of the compromised OpenAM server as a foothold for broader network compromise
General mitigation guidance
Effective mitigation centers on eliminating unsafe deserialization channels and minimizing trust in client-supplied state:
- Replace Java native deserialization for HTTP parameters with safer data formats (e.g., JSON, URL-encoded key/value pairs) that are parsed using non-executable parsers.
- Introduce strict server-side schemas for any client-provided state: validate structure, types, and ranges before use, and avoid reconstructing arbitrary object graphs.
- Where deserialization remains necessary, restrict it through robust allowlists that limit permissible classes to a small, auditable set, and avoid gadget-prone libraries in the classpath.
- Reduce reliance on client-side session representations (such as serialized objects in parameters); prefer server-side session storage with opaque, integrity-protected identifiers presented to clients.
- Run OpenAM processes with least-privileged OS accounts and hardened JVM settings to reduce the blast radius of a potential compromise (e.g., constrained file system and network access).
- Place internet-facing access management components behind application firewalls or API gateways that can enforce parameter-level controls, rate limiting, and anomaly detection on suspicious serialized payloads.
How teams detect issues like this
Organizations can approach detection using both code-centric and operational techniques:
- Static analysis: Configure SAST rules to flag usages of Java deserialization APIs (
ObjectInputStream,readObject, custom serializers) that operate on HTTP parameters or other untrusted sources, particularly within request handling flows. - Code review: During manual review, look for patterns where request parameters such as
jato.clientSessionor similar fields are decoded into objects rather than simple data types. Verify that any deserialization is tightly scoped and backed by explicit type constraints. - Configuration and policy checks: Use secure coding guidelines that disallow or heavily restrict Java serialization in web-exposed components, and enforce these via CI policies or pre-merge checks.
- Runtime monitoring: Analyze HTTP logs and WAF telemetry for anomalous
jato.clientSessionvalues, such as unusually long or binary-looking data. Enable runtime logging around deserialization failures and unexpected class resolution events within the JVM. - Automated tooling: Employ dependency and configuration scanners that highlight known deserialization sinks and common gadget chains in the classpath, and integrate these tools into regular security assessments.

