Exploiting Hardcoded Keys to achieve RCE in Yellowfin BI
Yellowfin BI used hardcoded cryptographic keys for authentication-related functions, allowing attackers to bypass authentication and forge sessions. After bypassing authentication, attackers could access a datasource connection feature and achieve remote command execution via JNDI injection.
Published on blog.assetnote.io
At Assetnote, we often audit enterprise software source code to discover pre-authentication vulnerabilities. Yellowfin BI had significance to us because it is a popular analytics platform for product managers, and we were able to deliver value to customers of our Attack Surface Management platform by alerting our…
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
Likely the application embedded private cryptographic keys and secrets directly in its source code, which were used to sign and encrypt authentication data, enabling attackers to forge valid sessions and tokens.
Impact
An attacker could bypass authentication to access any user account and then execute arbitrary commands on the server, but the JWT privilege escalation required a valid refresh token ID.
What the attacker needed
Knowledge of victim's user id; valid refresh token id (for JWT attack); network access to the application
The fix
The vulnerabilities were fixed in Yellowfin BI version 9.8.1.
How it was found
- Find the hardcoded RSA private key in the source code.
- Use the key to sign a request to the StoryBodyAction endpoint, bypassing authentication.
- Alternatively, use the hardcoded AES key to craft a valid EXTAPI-IPID cookie for the JsAPI servlet.
- After gaining authenticated access, use the datasource connection feature to perform JNDI injection.
- Achieve remote command execution via a forceString gadget.
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.
Hardcoded keys are secret values like passwords or encryption keys written directly into the software's code. If an attacker finds these keys, they can pretend to be any user or create valid login tokens. In this case, the attacker used these keys to log in without a password and then run commands 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.