Exposed WebView Bridge

Exposed WebView Bridge

A help article's widget could read the user's session.

What Is Exposed WebView Bridge?

An in-app help centre that exposes a JavaScript bridge to every page its WebView loads hands the user's session to whatever third-party content the page pulls in. You'll watch an attacker read a customer's token out of a help article and hijack her number, then pull the widget, revoke the exposed sessions and fence the bridge to the app's own origin.

What You'll Learn in Exposed WebView Bridge

Exposed WebView Bridge — Training Steps

  1. A bridge to every page

    Brevlane is a mobile carrier app. Customers check their data, read help articles and move their number to a new phone. The help centre is a WebView: the app's own screen frame around web pages served from Brevlane's help site. Bob pulls the release build apart and reads the decompiled code. He is looking for the bridge that lets those web pages call back into the app.

  2. What the article pulls in

    The help pages look like Brevlane's own, but Bob checks what each one loads. He fetches the article about moving a number to a new phone and reads its markup.

  3. The collector fills up

    Bob has push access to the Helpquill feedback widget that Brevlane's help pages embed, so his few lines run inside every help article a customer opens. How he reached that widget stays out of this lesson. The lines call the bridge and send what it returns to his server; the code stays out of this lesson too.

  4. Whose account is this

    Bob takes one captured token and calls the Brevlane API with it, as the customer.

  5. Take the number

    On a carrier, the account is the phone number. Bob transfers Yara's eSIM to a handset he controls, so her calls and texts, including login codes for her other accounts, come to him.

  6. How the token got out

  7. Numbers walking away

    Alice leads the Brevlane app team. Trust and Safety has escalated a pattern to her.

  8. Cut off the widget

    The leak is in the help centre. Before anything else, Alice pulls the third-party widget from the help pages and turns off the bridge with a remote flag the app checks on launch.

  9. Revoke the exposed sessions

    The tokens the widget could have read are still out there. Alice revokes every session the help widget touched this week and reverses the fraudulent transfers.

  10. Open the help screen

    Now the cause. Alice opens the code behind the help centre WebView.

Security Framework Coverage

OWASP Mobile Top 10

  • M4:2024 Insufficient Input/Output Validation

OWASP MASVS

  • MASVS-PLATFORM-2 The app uses WebViews securely.

CWE

  • CWE-749 Exposed Dangerous Method or Function
  • CWE-346 Origin Validation Error

CIS Controls

  • CIS 16 Application Software Security

NIST CSF

  • PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
  • PR.PS Platform Security

NICE Framework

  • DD-WRL-003 Secure Software Development