Exploiting an Order of Operations Bug to Achieve RCE in Oracle Opera
A file upload servlet in Oracle Opera sanitised encrypted parameters before decrypting them, allowing an attacker to bypass path restrictions and upload arbitrary files. This led to pre-authentication remote command execution by uploading a CGI web shell.
Published on blog.assetnote.io
If you work in the hospitality industry, it’s quite likely that you have seen or worked with Oracle Opera. This software is used by almost all of the largest hotels/resort chains around the world.
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
Impact
An unauthenticated attacker could execute arbitrary commands on the server, potentially accessing sensitive guest data including credit card details.
What the attacker needed
Network access to the Oracle Opera server; knowledge of the JNDI connection name (obtainable…; ability to encrypt strings with the static keys
The fix
The order of operations should be reversed: decrypt first, then sanitise the decrypted values.
How it was found
- Obtain the JNDI connection name from an unauthenticated servlet that displays it.
- Encrypt arbitrary strings using the static keys found in the software.
- Send a request to the FileReceiver servlet with the encrypted jndiname and username (containing path traversal) to upload a file.
- Access the uploaded CGI web shell to execute commands.
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.
The software checked the safety of some input before decoding it, so the check was useless. An attacker could then upload a malicious file to any location on the server and run commands without logging in.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.