Skip to content
XSS Disclosed report Intermediate

[Android] HTML Injection in BatterySaveArticleRenderer WebView

The Android Brave browser's article mode rendered the page title and author name into HTML without escaping, so a malicious page could inject markup into the WebView.

bobrov Follow

Originally disclosed on HackerOne

  • Triaged in 5 days
  • Fixed in 27 days
  • Paid in 9 days
  • Disclosed after 2.0 years

Summary:

HTML Injection in BatterySaveArticleRenderer WebView.

Products affected:

  • Android Brave Browser 1.9.56

Steps To Reproduce:

HTML
<script>
location="https://www.google.com/search?q=</title><h1><marquee><s>Injection<!--"
</script>
  • Wait for a full load
  • Click on ArticleModeButton

Supporting Material/References:

Vulnerable code:

Java
public class aot
...
// s7 == title
if(s7 != null)
{
  s4 = (new StringBuilder()).append(s5).append("<title>").append(s7).append("</title>").toString();
  s1 = (new StringBuilder()).append(s6).append("<p style=\"font-size:").append(s1).append(";line-height:120%;font-weight:bold;margin:").append(s3).append(" 0px 12px 0px\">").append(s7).append("</p>").toString();
...
// s8 == authorName
if(s8 != null)
  s1 = (new StringBuilder()).append("<span class=\"nowrap\"><b>").append(s8).append("</b>,</span> ").toString();

Attachments

Screenshot_20161016-041209.png
Screenshot_20161016-041209.png From the original on HackerOne
Screenshot_20161016-041215.png
Screenshot_20161016-041215.png

The original report as published on HackerOne, by bobrov. 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

The app concatenated the page title and author name directly into HTML strings without escaping them.

What the attacker needed

Victim uses Brave on Android; victim opens a malicious page; victim taps article mode

How it was found

  1. Open the provided test page in Brave.
  2. Wait for the page to finish loading.
  3. Tap the article mode button.

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.

This report shows that Brave put the page's title and author into that view without cleaning them first, so a bad page could sneak in its own markup.

What is XSS?

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

More by bobrov

View all

39 more disclosed reports, best first.

More from Brave Software

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.