Vulnerable to JavaScript injection. (WXS) (Javascript injection)!
A WebView in the HockeyApp update activity executes JavaScript from local HTML content, so an attacker who can modify local files could run malicious script inside the app. This could lead to information theft.
Originally disclosed on HackerOne
- Triaged in 12 days
- Fixed in 25 days
- Paid in 25 days
- Disclosed after 7 months
Vulnerable to JavaScript injection. (WXS)
Description: Java script injected in activity: net.hockeyapp.android.UpdateActivity with injection String: document.getElementsByTagName('body')[0].setAttribute('style', 'background-color: red');
Recommended Solution: Local HTML modifications via malware or other apps results in execution of malicious JavaScript in the presentation layer of the app. This may result in information theft.
Verify that JavaScript and Plugin support is disabled for any WebViews (usually the default).
Ensure that all UIWebView calls do not execute without proper input validation. Apply filters for dangerous JavaScript characters if possible, using a whitelist over blacklist character policy before rendering.
References: Mobile Top 10 2014-M7(Client Side Injection) - OWASP Adventures with Android WebViews (Javascript injection) - OWASP
Thanks,
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 WebView has JavaScript enabled and loads local HTML without validating or filtering its content.
Impact
An attacker who can modify local HTML could execute JavaScript in the app's presentation layer, which may result in information theft.
What the attacker needed
Ability to modify local HTML files; malware or another app on the device
The fix
JavaScript and plugin support should be disabled for WebViews, and input should be validated with a whitelist before rendering.
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 WebView is a mini browser inside an app. Here the app loads a local web page and runs any JavaScript on it, so if another app or malware changes that page, the attacker's script runs inside the app and can read data.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.