Identity Confusion in WebView-based Mobile App-in-app Ecosystems
The paper found that super-apps use three types of identities (web domains, sub-app IDs, and capabilities) to control access to privileged APIs, but these checks are often poorly designed, granting broader access than intended. This identity confusion could let attackers manipulate users' financial accounts and install malware on smartphones.
Lei Zhang, Zhibo Zhang, and Ancong Liu, Fudan University; Yinzhi Cao, Johns Hopkins University; Xiaohan Zhang, Yanjun Chen, Yuan Zhang, Guangliang Yang, and Min Yang, Fudan University
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Mobile apps frequently delegate parts of their functionality to third parties, turning themselves into a super ecosystem that hosts those parties. The paper calls such apps super-apps and the delegated parties sub-apps, which behave like an "app-in-app". A sub-app loads third-party resources like a normal app but also gets access to privileged APIs provided by the super-app. That raises the central question of the research: who is allowed to access those privileged APIs?
The work is a USENIX Security 22 paper by Lei Zhang, Zhibo Zhang and Ancong Liu (Fudan University), Yinzhi Cao (Johns Hopkins University), and Xiaohan Zhang, Yanjun Chen, Yuan Zhang, Guangliang Yang and Min Yang (Fudan University). It received a Distinguished Paper Award. The study covers WebView-based app-in-app ecosystems.
Setup
The study examined 47 real-world super-apps. According to the abstract, all 47 of them exhibited identity confusion. The paper does not describe individual test accounts, device models or tool versions in the material available here; what it does describe is the identity model the super-apps use and the checks they perform on it.
Finding it
Super-apps, according to the study, use three types of identity to decide whether a caller may reach a privileged API:
- Web domains
- Sub-app IDs
- Capabilities
The researchers found that the identity checks for these three types are often not well designed. The result is a violation of the least privilege principle: the set of recipients granted a privileged API is broader than intended. The paper names this class of flaw "identity confusion". To the authors' knowledge, no prior work had studied this type of vulnerability.
What makes the finding notable is that confusions of all three identity types are widespread among the 47 super-apps studied.
Exploitation
The abstract states that the confusions lead to severe consequences, including manipulating users' financial accounts and installing malware on a smartphone. It does not, in the text available here, walk through individual requests, payloads or step-by-step reproductions; those details sit in the full paper and slides linked from the presentation page.
Root cause
The design mistake is that privileged API access is gated on identities (web domain, sub-app ID, capability) whose checks are not strict enough. Because the check admits a broader set of callers than the API intends, a party that should not hold the privilege can present an identity that passes. The paper frames this as a failure to enforce least privilege rather than as a single coding bug. The abstract does not attribute the flaw to a specific implementation detail, so the precise mechanism per super-app is likely covered in the full paper.
Impact
The consequences reported are severe: manipulation of users' financial accounts and installation of malware on a smartphone. These affect users of the affected super-apps, and the paper reports that the confusions were widespread across all 47 super-apps studied. The authors responsibly reported all findings to the developers of the affected super-apps and helped them fix the vulnerabilities.
Fix
The paper states that the researchers reported findings to developers and helped them fix their vulnerabilities. It does not, in the available text, specify the individual patches applied by each vendor.
Variants to test
For researchers probing similar app-in-app ecosystems:
- Web domain identity: check whether a privileged API trusts a domain string that can be spoofed or matched loosely. A positive result is a caller from an unintended domain reaching the API.
- Sub-app ID identity: check whether sub-app IDs are validated strictly. A positive result is a sub-app obtaining privileges meant for another sub-app.
- Capability identity: check whether capability tokens or grants are scoped to the intended party. A positive result is a capability being usable by a party it was not issued to.
- Cross-type confusion: check whether mixing identity types (for example, presenting a valid domain with an unintended sub-app ID) bypasses the combined check.
Presentation
The paper was presented at the 31st USENIX Security Symposium (USENIX Security 22) in Boston, MA, in August 2022, pages 1597 to 1613.
@inproceedings {280044,
author = {Lei Zhang and Zhibo Zhang and Ancong Liu and Yinzhi Cao and Xiaohan Zhang and Yanjun Chen and Yuan Zhang and Guangliang Yang and Min Yang},
title = {Identity Confusion in {WebView-based} Mobile App-in-app Ecosystems},
booktitle = {31st USENIX Security Symposium (USENIX Security 22)},
year = {2022},
isbn = {978-1-939133-31-1},
address = {Boston, MA},
pages = {1597--1613},
url = {https://www.usenix.org/conference/usenixsecurity22/presentation/zhang-lei},
publisher = {USENIX Association},
month = aug
}
The paper PDF and slides are linked from the presentation page.
What happened, in plain words
A group of academic researchers studied a common pattern in mobile apps: one big app lets other, smaller apps run inside it. The big app is called a super-app, and the smaller ones are called sub-apps. The pattern is called app-in-app, because it looks like an app living inside another app.
The super-app gives its sub-apps access to powerful features, called privileged APIs. For example, a sub-app might be allowed to ask the super-app to do something on the user's behalf, such as touching a financial account. The obvious question is: who exactly is allowed to use those powerful features? The super-app has to check the identity of whoever is asking.
The researchers looked at 47 real super-apps and found that confusions of the three identity types were widespread among all of them. A party that should not have had a privilege could still get it, because the check accepted an identity it should have rejected. The paper calls this identity confusion. In the worst cases, the researchers say, this could let an attacker manipulate a user's financial account or install malware on a phone.
This page is the public record of that paper: its abstract, a citation, a PDF, slides and a video of the talk. The paper was presented at the 31st USENIX Security Symposium (USENIX Security 22) in Boston, MA, in August 2022, on pages 1597 to 1613, and it won a Distinguished Paper Award. The findings were reported to the developers of the affected super-apps, and the researchers helped them fix the problems.
Context
What a super-app and a sub-app are
Most people know apps as separate icons on a phone. A super-app is different: it is one app that hosts other apps inside it. Think of a shopping mall. The mall building is the super-app; the individual shops inside it are the sub-apps. The mall provides the building, the electricity and the security guards, and the shops use those shared facilities.
In the same way, a sub-app loads its own content, just like a normal app, but it also gets to use features that the super-app provides. Those features are the privileged APIs.
What an API is
API stands for Application Programming Interface. It is the set of doors and counters through which one piece of software asks another piece of software to do something. At a restaurant, you do not walk into the kitchen and cook; you order from the menu and the kitchen does the work. An API is that menu plus the waiter: a defined way to ask for something and get a result back.
A privileged API is one where the answer matters: it can move money, read private data, or change something important. Because of that, the super-app must check who is asking before it serves the request.
What a WebView is
A WebView is a component inside a mobile app that can display web pages. It is like a small browser window embedded in the app. Many app-in-app systems are built on WebViews: the sub-app is essentially a web page shown inside the super-app, and the super-app exposes special abilities to that page.
The question the paper asks
The central research question is simple to state: who is allowed to access those privileged APIs? The super-app has to decide, for every request, whether the caller is entitled to the privilege. If that decision is wrong, the wrong party gets power it should not have.
Who did the work
The paper is by Lei Zhang, Zhibo Zhang and Ancong Liu of Fudan University; Yinzhi Cao of Johns Hopkins University; and Xiaohan Zhang, Yanjun Chen, Yuan Zhang, Guangliang Yang and Min Yang, also of Fudan University. It received a Distinguished Paper Award. The study covers WebView-based app-in-app ecosystems.
Setup
The study examined 47 real-world super-apps. According to the abstract, all 47 of them exhibited identity confusion. The material here does not describe individual test accounts, device models or tool versions; what it does describe is the identity model the super-apps use and the checks they perform on it.
Finding it
Super-apps, according to the study, use three types of identity to decide whether a caller may reach a privileged API:
- Web domains
- Sub-app IDs
- Capabilities
Each of these needs a short explanation, because the whole finding rests on them.
Web domains
A domain is the name part of a web address, the part like example.com. When a super-app trusts a domain, it is saying: requests coming from pages on this domain are allowed. This is like a club that lets in anyone wearing a particular badge. If the badge is easy to copy, the check is weak.
Sub-app IDs
A sub-app ID is a name or number that identifies one particular sub-app, the way a student ID identifies one student. If the super-app checks the sub-app ID, it is trying to say: this specific sub-app is allowed, and no other. If IDs are not validated strictly, one sub-app can pretend to be another.
Capabilities
A capability is a permission slip. Instead of asking who you are, the system asks whether you hold the right slip. This is like a concert ticket: whoever holds the ticket gets in. If a ticket is not tied to its intended holder, someone else can use it.
What went wrong
The researchers found that the identity checks for these three types are often not well designed. The result is a violation of the least privilege principle. Least privilege is a basic security rule: give each party only the minimum access it needs to do its job, and nothing more. When a check is too loose, the set of recipients granted a privileged API is broader than intended. The paper names this class of flaw identity confusion. To the authors' knowledge, no prior work had studied this type of vulnerability.
What makes the finding notable is that confusions of all three identity types are widespread among the 47 super-apps studied.
Exploitation
The abstract states that the confusions lead to severe consequences, including manipulating users' financial accounts and installing malware on a smartphone. Malware is software written to do harm, such as stealing data or taking control of a device.
The text available here does not walk through individual requests, payloads or step-by-step reproductions; those details sit in the full paper and slides linked from the presentation page.
Root cause
The design mistake is that privileged API access is gated on identities (web domain, sub-app ID, capability) whose checks are not strict enough. Because the check admits a broader set of callers than the API intends, a party that should not hold the privilege can present an identity that passes. The paper frames this as a failure to enforce least privilege rather than as a single coding bug. The abstract does not attribute the flaw to a specific implementation detail, so the precise mechanism per super-app is likely covered in the full paper.
A useful comparison is a bouncer at a door who checks only that a person is wearing a lanyard, not what the lanyard says. The rule was meant to admit staff only, but anyone who owns a lanyard gets in. The bouncer is not broken in the sense of crashing; the rule itself is too weak.
Impact
The consequences reported are severe: manipulation of users' financial accounts and installation of malware on a smartphone. These affect users of the affected super-apps, and the paper reports that the confusions were widespread across all 47 super-apps studied. The authors responsibly reported all findings to the developers of the affected super-apps and helped them fix the vulnerabilities.
Fix
The paper states that the researchers reported findings to developers and helped them fix their vulnerabilities. It does not, in the available text, specify the individual patches applied by each vendor.
In everyday terms: the bouncer should read the lanyard, not just see that one exists, and the lanyard should be hard to forge and tied to one person.
Variants to test
For researchers probing similar app-in-app ecosystems, the paper's three identity types suggest four things to look at:
- Web domain identity: check whether a privileged API trusts a domain string that can be spoofed or matched loosely. A positive result is a caller from an unintended domain reaching the API.
- Sub-app ID identity: check whether sub-app IDs are validated strictly. A positive result is a sub-app obtaining privileges meant for another sub-app.
- Capability identity: check whether capability tokens or grants are scoped to the intended party. A positive result is a capability being usable by a party it was not issued to.
- Cross-type confusion: check whether mixing identity types (for example, presenting a valid domain with an unintended sub-app ID) bypasses the combined check.
Presentation
The paper was presented at the 31st USENIX Security Symposium (USENIX Security 22) in Boston, MA, in August 2022, pages 1597 to 1613.
The citation for the paper, in BibTeX format, is reproduced below. BibTeX is a plain-text way of recording a reference so that a bibliography tool can format it later.
@inproceedings {280044,
author = {Lei Zhang and Zhibo Zhang and Ancong Liu and Yinzhi Cao and Xiaohan Zhang and Yanjun Chen and Yuan Zhang and Guangliang Yang and Min Yang},
title = {Identity Confusion in {WebView-based} Mobile App-in-app Ecosystems},
booktitle = {31st USENIX Security Symposium (USENIX Security 22)},
year = {2022},
isbn = {978-1-939133-31-1},
address = {Boston, MA},
pages = {1597--1613},
url = {https://www.usenix.org/conference/usenixsecurity22/presentation/zhang-lei},
publisher = {USENIX Association},
month = aug
}
Line by line, in plain words:
@inproceedings {280044,opens a record for a conference paper, with an internal reference number of 280044.author = {...}lists the people who wrote the paper, separated byand.title = {...}gives the paper's title. The inner braces keep the capitalisation ofWebView-basedintact when the reference is formatted.booktitle = {...}names the conference proceedings the paper appears in.year = {2022}is the year of publication.isbn = {...}is the book's international standard number, a unique identifier for the published proceedings.address = {Boston, MA}is where the conference took place.pages = {1597--1613}gives the page range of the paper inside the proceedings.url = {...}is the web address of the presentation page.publisher = {USENIX Association}names the organisation that published the proceedings.month = augis the month of the conference.- The closing
}ends the record.
The paper PDF and slides are linked from the presentation page.
Glossary
- API: Application Programming Interface; the defined way one piece of software asks another to do something, like a menu and waiter at a restaurant.
- App-in-app: a pattern where a smaller app runs inside a larger host app.
- BibTeX: a plain-text format for recording references so bibliography tools can format them.
- Capability: a permission slip or token that grants access to something, checked instead of, or in addition to, who the caller is.
- Distinguished Paper Award: an award given by a conference to recognise an especially notable paper.
- Domain: the name part of a web address, such as
example.com. - Identity confusion: the paper's term for a flaw where an identity check is too loose, so a privileged API is granted to a broader set of recipients than intended.
- Least privilege: the security rule that each party should get only the minimum access it needs, and nothing more.
- Malware: software written to do harm, such as stealing data or taking over a device.
- Privileged API: an API that can do something important, such as move money or read private data, and therefore needs a check on who is calling.
- Sub-app: an app that runs inside a super-app and uses the features the super-app provides.
- Sub-app ID: a name or number that identifies one particular sub-app.
- Super-app: a host app that runs other apps inside it and provides them with features.
- USENIX Security Symposium: an academic security conference; the 31st edition was held in Boston, MA, in August 2022.
- Vulnerability: a weakness in software that can be used to make it behave in ways its designers did not intend.
- WebView: a component inside a mobile app that displays web pages, like a small browser embedded in the app.