Mass Account Takeover In The Yunmai Smart Scale API
The Yunmai smart scale API lacked authorization checks, allowing an attacker to add or delete family members on other users' accounts. By chaining user ID enumeration, this flaw, and an information leak of tokens, an attacker could impersonate accounts and achieve mass account takeover.
fortbridge.co.uk
Published on fortbridge.co.uk
Recently, during an internal IoT research project, we did a pentest of the Android and iOS Yunmai smart scale apps. Below are the 5 vulnerabilities that we discovered, and we chained 3 of these (#2,#3 and #4) to achieve mass account takeover.
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 the API endpoints for adding and deleting family members did not verify that the target account belonged to the authenticated user, and the server returned tokens for newly created child accounts without proper ownership checks.
Impact
An attacker could add or delete family members on any account and, by chaining with user ID enumeration and token leakage, impersonate users and access their weight and personal data, achieving mass account takeover.
What the attacker needed
Android or iOS app; victim's puId known; no special privileges
The fix
The API should enforce authorization checks to ensure that family member operations only affect accounts owned by the authenticated user, and should not return tokens for accounts created under another user's puId.
How it was found
- Brute-force the last five digits of user IDs via the Android endpoint that returns user details when the 16-member limit is reached.
- Extract puId values from the responses to identify primary accounts.
- Send a request to add a family member, replacing the puId with the victim's puId.
- Capture the accessToken and refreshToken returned in the response.
- Use the refreshToken to obtain a new accessToken and impersonate the new family member.
- Switch to the victim's primary account using the swatchLogin endpoint and query their data.
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.
The app lets you create sub-accounts for family members, but the server did not check whether the account you were modifying actually belonged to you. An attacker could guess other people's account numbers, add a fake family member to their account, and receive login tokens for that fake member, then use those tokens to access the victim's data.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.