Yet Another Telerik UI Revisit
The Telerik UI DialogHandler and SpellCheckHandler endpoints use a weak custom encryption scheme (Base64, rotating XOR, Base64) to protect dialog parameters, and error messages leak whether decrypted data is valid Base64. An attacker can exploit this to recover the encryption key and then use the DialogHandler to upload files, potentially leading to remote code execution.
Published on blog.blacklanternsecurity.com
Products and Tools
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 use of a weak, custom encryption scheme (rotating XOR with Base64) for authentication, combined with verbose error messages that leak information about the decryption process.
Impact
An attacker could recover the encryption key and use the DialogHandler to upload files, potentially leading to remote code execution on the server.
What the attacker needed
Access to the vulnerable endpoint; Ability to send HTTP requests
The fix
The patched version of Telerik UI uses AES in CBC mode with HMAC256 to validate integrity before decryption.
How it was found
- Send a request to the DialogHandler endpoint with an encrypted dialog parameter (dp).
- Observe the error message to determine if the decrypted data is valid Base64.
- Use the error messages to narrow down the possible key characters by sending probes.
- Repeat the probing process for each character position until the entire key is recovered.
- Use the recovered key to encrypt a malicious dialog parameter that loads the file manager.
- Upload a malicious file (e.g., an .aspx file) to the web root to achieve code execution.
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.
Telerik UI is a set of tools for building web applications. The vulnerable part uses a simple scrambling method (XOR) to hide some settings, but it also shows different error messages depending on whether the scrambled data looks right. By sending many requests and watching the errors, an attacker can figure out the secret key used for scrambling. With that key, they can unlock a file manager and upload malicious files, which can let them run their own code on the server.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.