Skip to content
XSS Disclosed report Intermediate

Camo Image Proxy Bypass with CSS Escape Sequences

The profile bio filter failed to recognise CSS escape sequences in image URLs, so a crafted style could bypass the image proxy. A room owner could then force visitors to make unintended requests to arbitrary URLs.

zhutyra Follow

Originally disclosed on HackerOne

  • Triaged in 6 hours
  • Fixed in 10 hours
  • Paid in 7 hours
  • Disclosed after 23 days

Summary

With CSS escape sequences it is possible to bypass CSS url detection and filtering.

Details

Users can use HTML tags in their Profile Bio in About Me and Wish List fields. Among other filtering and sanitization, image URLs are replaced by URLs on internal image proxy. For example, this content in About Me:

HTML
<span style="background:url(http://foo.com/bar)">XX</span>

Will be replaced by this:

HTML
<span style="background:url(https://camo.stream.highwebmedia.com/f923a95762fc0b6025015c00b58922b72f25096d/687474703a2f2f666f6f2e636f6d2f626172)" target="_blank" rel="nofollow">XX</span>

The problem is that the parser doesn't support CSS escape sequences, and for example this form, with letter r written as hexadecimal escape sequence, will not be detected as image link:

HTML
<span style="background:u\72l(http://foo.com/bar)">XX</span>

Steps To Reproduce:

Put the code mentioned above in your Bio.

01-edit.png
01-edit.png From the original on HackerOne

After saving the edit, you can use the Developer Tools to inspect the element and see that the URL has not been replaced.

02-inspect.png
02-inspect.png From the original on HackerOne

And in Network monitor in Developer Tools you can see that it was processed. In this case blocked by Content Security Policies.

03-network.png
03-network.png From the original on HackerOne

Note

I'm not aware of any immediate security threat from this. Like, I have no accompanying CSRF or information leak and I assume use of browsers that adhere to CSP. But definitely it is something that should be fixed.

Impact

The room owner can force room visitors to make unintended URL requests.

The original report as published on HackerOne, by zhutyra. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 URL detection logic did not decode CSS escape sequences before checking for image URLs.

Impact

A room owner could force visitors to make unintended URL requests, though the reporter notes CSP blocked the request in their test and no immediate security threat was identified.

What the attacker needed

Ability to edit profile bio; victim views the profile or room; browser adheres to CSP

The fix

The CSS URL detection should be fixed so escaped URLs are handled.

How it was found

  1. Put the crafted style with an escaped letter in the About Me bio field.
  2. Save the profile edit.
  3. Inspect the element with Developer Tools and see the URL was not replaced.
  4. Check the Network monitor and see the request was made, though blocked by CSP.

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.

A website tried to rewrite image links in user profiles so they went through a safe proxy. But it did not understand a CSS trick where a letter is written in an escaped form, so the link slipped through. That let a profile owner make other people's browsers contact a URL of their choosing.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Chaturbate

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.