Don't Leak Your Keys: Understanding, Measuring, and Exploiting the AppSecret Leaks in Mini-Programs
Not on the map. Why?
Abstract (arXiv)
Mobile mini-programs in WeChat have gained significant popularity since their debut in 2017, reaching a scale similar to that of Android apps in the Play Store. Like Google, Tencent, the provider of WeChat, offers APIs to support the development of mini-programs and also maintains a mini-program market within the WeChat app. However, mini-program APIs often manage sensitive user data within the social network platform, both on the WeChat client app and in the cloud. As a result, cryptographic protocols have been implemented to secure data access. In this paper, we demonstrate that WeChat should have required the use of the "appsecret" master key, which is used to authenticate a mini-program, to be used only in the mini-program back-end. If this key is leaked in the front-end of the mini-programs, it can lead to catastrophic attacks on both mini-program developers and users. Using a mini-program crawler and a master key leakage inspector, we measured 3,450,586 crawled mini-programs and found that 40,880 of them had leaked their master keys, allowing attackers to carry out various attacks such as account hijacking, promotion abuse, and service theft. Similar issues were confirmed through testing and measuring of Baidu mini-programs too. We have reported these vulnerabilities and the list of vulnerable mini-programs to Tencent and Baidu, which awarded us with bug bounties, and also Tencent recently released a new API to defend against these attacks based on our findings.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). First posted on arXiv 13 Jun 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 1; 2026: 1.
3 papers.
- 2024Protect Your Secrets: Understanding and Measuring Data Exposure in VSCode Extensionscited by 1
- 2025Argus: A Multi-Agent Sensitive Information Leakage Detection Framework Based on Hierarchical Reference Relationshipscited by 0
- 2026Separating Secrets from Placeholders: A Hybrid CNN-CodeBERT Framework for Three-Class Credential Leakage Detectioncited by 0
- 2026Separating Secrets from Placeholders: A Hybrid CNN-CodeBERT Framework for Three-Class Credential Leakage Detection29 May 2026
- 2025Argus: A Multi-Agent Sensitive Information Leakage Detection Framework Based on Hierarchical Reference Relationships9 Dec 2025
- 2024Protect Your Secrets: Understanding and Measuring Data Exposure in VSCode Extensions1 Dec 2024