OTDS allows unauthenticated remote code execution via unsafe Java deserialization
OTDS’s default configuration is vulnerable to unauthenticated remote code execution through unsafe Java deserialization.
Security & privacy Assetnote / Searchlight 16 Feb 2026 Disclosure Real-world evidence
Published as “We recently found ourselves looking into OpenText Directory Services (OTDS). We had seen it present on our customer's attack surface, and it seemed to be an interesting target.”
Why it matters
An unauthenticated attacker can achieve remote code execution on any deployment of OTDS that uses the vulnerable default settings.
Summary
The researchers examined OpenText Directory Services (OTDS) and found a call to ObjectInputStream.readObject() in the cookieToMap method, which deserializes attacker-controlled cookie data. A flaw in the signature verification (the HMAC is computed over IV||message without including length fields) lets an attacker truncate the message and move malicious bytes into the deserialized region. Because the payload must be ASCII-only and compressed, they built a custom Deflate compressor (using ascii-zip and later a hand-crafted generator) to satisfy the character constraints, then delivered a ysoserial payload that achieved remote code execution without authentication. The exploit was demonstrated against a live OTDS instance, confirming the vulnerability.
What they found 1
- Unsafe deserialization occurs in the cookieToMap method via ObjectInputStream.readObject()
“public static Map<String, Object> cookieToMap(String cookieName, String cookieVal) { byte[] compressed = OtdsUtils.getByteArrayFromSignedArray(OtdsUtils.safeDecode(cookieVal), OtdsAsConfig.getCookieSecretKey()); byte[] decompressed = CompressionUtils.decompress(compressed); ByteArrayInputStream bais = new ByteArrayInputStream(decompressed); ObjectInputStream ois = new ObjectInputStream(bais); Map<String, Object> theMap = (Map<String, Object>)ois.readObject(); return theMap; }”
Caveats 4
- The authors note that "exploitation was quite difficult" and required extensive trial-and-error, custom compressors, and careful payload shaping.
- Exploitation required a custom ASCII-only Deflate compressor and many manual steps, making it non-trivial.
- The attack works only on the default configuration of OTDS without authentication.
- Payload size and character restrictions add significant complexity to the exploit.
What’s new here 4
- Identified unsafe deserialization in OTDS's cookie handling routine.
- Discovered a signature verification mistake that allows message truncation and bypass of HMAC validation.
- Developed a custom ASCII-only Deflate compressor to meet strict character restrictions.
- Delivered a working unauthenticated RCE exploit against default OTDS configuration.