CBC "cut and paste" attack may cause Open Redirect(even XSS)
The redirect page on a subdomain encrypted the destination URL with a block cipher in CBC mode and exposed an encryption oracle through a separate page, so an attacker could splice ciphertext blocks to make the redirect point at an arbitrary site. This allowed an open redirect, and the author suggested it could potentially lead to XSS.
Originally disclosed on HackerOne
- Triaged in 2 days
- Fixed in 4 months
- Paid in 4 months
- Disclosed after 5 months
Hello, Uber Security Team
I found an vulnerability in Uber URL redirect page.
Vulnerability
In page
http://pages.et.uber.com/Redirect.aspx?EQ=5c591a8916642e73ef70dd2c27bd4bad7d810b960a984f390e396861d8a70dfd8d4ad287476f76f106d578f9ace7becffd6e3b312bb4c389315d140317a39050ed569698560fe77404eb8e2f6b2299542477613ae27b43d6d75e133918f7531a2cbea134db7c614a0182342d7079019621af699d14cb1a7cfaa5d14b2982a1a7082d1ff2507b504e68763a7c621e409ef8dd7fe980c48e0664bcb71d4d96523bec4638573e1cff2ba6cc032c5986fe5497c86cfaefb22406bd798a7f8312fde3acd3757bd120dfa0e40f3acb1e99e66c
parameter "EQ" is an encrypted URL and "Redirect.aspx" will redirect page to url which is decrypted. After some trying, it looks like encryted by CBC mode and block size is 8.
And I found an URL
https://pages.et.uber.com/hangzhou1year/?uuid=1234
This URL can encrypted itself. For example
Access
https://pages.et.uber.com/hangzhou1year/?uuid=1234
and view the source you will see
https://pages.et.uber.com/Redirect.aspx?EQ=5c591a8916642e73ef70dd2c27bd4bad7d810b960a984f390e396861d8a70dfd8d4ad287476f76f106d578f9ace7becffd6e3b312bb4c389315d140317a39050ed569698560fe77404eb8e2f6b2299542477613ae27b43d6d75e133918f7531a2cbea134db7c614a0182342d7079019621af699d14cb1a7cfaa5d14b2982a1a7082d1ff2507b504e68763a7c621e409ef8dd7fe980c48e0664bcb71d4d96523bec4638573e1cff2ba6cc032c5986fe5497c86cfaefb22406bd798a7f8312fde3acd3757bd120dfa025d290b1cf9a6e85
Above is the encrypted result of string https://pages.et.uber.com/hangzhou1year/?uuid=1234
Exploiting
ok, now I can encrypt something by ?uuid=whatever and decrypt something by ?EQ=whatever
so I can decrypt all the cipher by ?EQ=whatever (remember the padding...)
And I can create any cipher by CBC cut and paste attack
For Example, I encrypt @orange.tw/? and paste and cipher to bellow URL, when you access URL, you will redirect to orange.tw(my website)
http://pages.et.uber.com/Redirect.aspx?EQ=5c591a8916642e73ef70dd2c27bd4bad7d810b960a984f390e396861d8a70dfd8d4ad287476f76f106d578f9ace7becffd6e3b312bb4c389315d140317a39050ed569698560fe77404eb8e2f6b2299542477613ae27b43d6d75e133918f7531a2cbea134db7c614a0182342d7079019621af699d14cb1a7cfaa5d14b2982a1a7082d1ff2507b504e68763a7c621e409ef8dd7fe980c48e0664bcb71d4d96523bc9a3bb1c67bf3b0edc8be7c80b4a998d2ce17fd5dd704e741309ec46b0627b0c1924321b894eebbc0128fce2b552959e
I think this vulnerability also can lead to XSS by creating an URL like
data:text/html base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K
if I have more time doing research ( it's evening in my country now :O )
Attachments
fake.py is my Python poc
2016-03-26_172607.jpg decrypt the last block of cipher (%08%08%08%08%08%08%08%08 represented it use PKCS #5 padding)
Attachments

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
Likely the application used CBC-mode encryption without integrity protection and exposed an encryption oracle, allowing cut-and-paste manipulation of ciphertext blocks.
Impact
An attacker could craft a link on the trusted domain that redirects victims to an arbitrary site, and the author suggests it may also enable XSS.
What the attacker needed
Victim clicks a crafted link
How it was found
- Visit the hangzhou1year page with a uuid parameter and view the source to obtain the encrypted redirect link.
- Use the EQ parameter on Redirect.aspx to decrypt arbitrary ciphertext.
- Encrypt a chosen string via the uuid parameter to obtain its ciphertext.
- Splice ciphertext blocks together and place the result in the EQ parameter.
- Access the crafted Redirect.aspx URL and observe the redirect to the attacker's site.
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 site stored the destination address in scrambled form so users could not simply edit it. But it also gave visitors a way to scramble any text they chose, and the scrambling method could be mixed and matched like puzzle pieces. By combining pieces, the attacker made the site send visitors to a website of their choosing.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.