Skip to content
RCE Advisory Advanced

GHSL-2024-295: Deserialization of untrusted data in Yshopmall

Yshopmall enables the autoType setting in the fastjson library, which allows deserialization of untrusted data. An attacker could create objects of arbitrary classes and call their setters with arbitrary values, potentially leading to remote code execution.

Michael Stepankin Follow

Originally disclosed on GitHub Security Lab

Yshopmall is affected by a Deserialization of Untrusted Data vulnerability due to the usage of the alibaba/fastjson library with the autoType setting enabled.

artsploit, 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 application explicitly enables the autoType feature in fastjson, which is disabled by default for security reasons.

Impact

This issue may lead to Remote Code Execution in the worst case, but a specific gadget chain was not provided.

What the attacker needed

Ability to send JSON to a vulnerable endpoint

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.

The application uses a library called fastjson to convert JSON data into Java objects. By turning on a risky feature called autoType, it lets attackers specify any class to be created, which can lead to serious consequences like running malicious code.

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 Michael Stepankin

View all

16 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.