Liferay Portal JSON Web Service RCE Vulnerabilities
Multiple JSON deserialization vulnerabilities in Liferay Portal allowed unauthenticated attackers to instantiate arbitrary classes and invoke setter methods, leading to remote code execution via publicly known gadgets. The flaws affected versions 6.1, 6.2, 7.0, 7.1, and 7.2, and were fixed in later releases.
Published on codewhitesec.blogspot.com
Code White has found multiple critical rated JSON deserialization vulnerabilities affecting the Liferay Portal versions 6.1, 6.2, 7.0, 7.1, and 7.2. They allow unauthenticated remote code execution via the JSON web services API.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The JSON deserializer allowed arbitrary class instantiation and setter invocation without a whitelist, and Liferay's parameter type handling let attackers specify any class for deserialization.
Impact
Unauthenticated remote code execution was possible via publicly known gadgets, though the JSON web service API can be configured to deny unauthenticated access.
What the attacker needed
JSON web service API accessible; unauthenticated access not denied
The fix
The vulnerabilities were fixed in Liferay Portal 6.2 GA6, 7.0 GA7, 7.1 GA4, and 7.2 GA2 by using a whitelist of allowed classes.
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 write-up has not been written yet. The Original tab links to the source.
Liferay Portal is a web portal product. Its JSON web service API accepted specially crafted requests that let an attacker make the server create objects of any class and call their setter methods. Because some of those classes can be abused to run commands, an unauthenticated attacker could execute code on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.