GHSL-2021-073: Post-authentication unsafe reflection in NSA Emissary - CVE-2021-32647
The CreatePlace REST endpoint accepts an sppClassName parameter that loads an arbitrary class and instantiates it with a three-string constructor. A logged-in attacker could supply a class from the application classpath to potentially achieve remote code execution or disrupt the application.
Originally disclosed on GitHub Security Lab
A logged-in user can invoke the constructor of some classes with untrusted data.
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 endpoint uses user-controlled input to load and instantiate an arbitrary class without validating or restricting the class name.
Impact
An attacker could potentially achieve remote code execution or disrupt the application, though the chances of finding a suitable gadget are low.
What the attacker needed
A logged-in user account
How it was found
- Send a POST request to the CreatePlace endpoint with a crafted sppClassName parameter.
- The server loads the specified class and instantiates it using a constructor that takes three strings.
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 lets a logged-in user choose which Java class to create by sending a class name in a request. If an attacker picks a class that does something dangerous when created, they might run their own code or crash the server. This is called unsafe reflection because the program uses user input to decide which code to run.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.