Wechat And Baidu Super Apps Uncovering The Authentication Secret Leakage Problem
Many WeChat and Baidu mini-apps hard-code their developer app secrets in source code, and attackers without a super-app account can use these leaked secrets to impersonate mini-apps, call server-side APIs, and cause various harms such as resource exhaustion, phishing, and data tampering.
Published on infosecwriteups.com
Hello, everyone! Continuing from our previous discussion about “What mini-apps are,” if you haven’t had a chance to read that article yet, I encourage you to do so now.
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, developers hard-coded the app secret directly in the mini-app source code instead of keeping it on a secure server.
Impact
Attackers could impersonate mini-apps, exhaust API quotas, send phishing messages, tamper with data, and upload files, though some attacks were only feasible on WeChat and not Baidu.
What the attacker needed
Leaked app secret in mini-app code; no super-app account needed
The fix
Super-apps should disallow hard-coding of app secrets, mandate IP whitelisting, and switch to dynamic user-bound tokens; developers should use cloud-hosted backends to avoid explicit secrets.
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 write-up has not been written yet. The Original tab links to the source.
Mini-apps are small programs that run inside apps like WeChat. They use a secret code to prove their identity to the super-app's servers. If that secret is left in the mini-app's code, anyone who finds it can pretend to be the mini-app and misuse its access.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.