Skip to content
RCE Advisory Advanced CVE-2023-36480

GHSL-2023-044: Unsafe Deserialization in Aerospike Java client - CVE-2023-36480

The Aerospike Java client deserialises Java objects from server responses without validation. An attacker who can make the client connect to a malicious server can send crafted objects that execute arbitrary code on the client machine.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

The Aerospike Java client is a Java application that implements a network protocol to communicate with an Aerospike server. Some of the messages received from the server contain Java objects that the client deserializes when it encounters them without further validation.

ghsecuritylab, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The client deserialises Java objects from server responses without validating the data, allowing an attacker-controlled server to supply a malicious serialised object.

Impact

This issue may lead to Remote Code Execution (RCE) in the Java client, allowing an attacker to take control of the machine the client is running on.

What the attacker needed

Client connects to a malicious server; deserialization gadget on classpath

How it was found

  1. Set up a malicious Aerospike server that responds to the client's requests.
  2. Use the client's AsyncPutGet example with the -netty flag, which connects to localhost:3000 by default.
  3. Make the mock server return normal responses until an AsyncRead command occurs.
  4. When the AsyncRead command is detected, send a crafted response containing a serialised payload in a JBLOB particle.
  5. The client deserialises the payload, executing the gadget chain (e.g., Apache Commons Collections) and running arbitrary code.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a program receives data, it sometimes turns that data back into objects (like a saved game state). If it does this without checking what is inside, an attacker can send a malicious object that runs code when opened. Here, the Aerospike client did this with data from the server, so a bad server could take over the client's computer.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by ghsecuritylab

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.