From Zero Auth to Admin Access
Several unauthenticated API endpoints on an IoT platform allowed creating an admin user, obtaining a signed JWT, publishing arbitrary messages to a production Kafka broker, and retrieving security answers for any user by email. An attacker could gain full admin access and read sensitive data without any credentials.
medium.com
Published on medium.com
It was 2AM. The kind of 2AM where the city is dead quiet, the streets are empty, and the only light in your room is the blue glow of your monitor.
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 missing authentication checks on sensitive API endpoints, combined with insecure defaults such as static AES encryption and verbose error messages.
Impact
An unauthenticated attacker could create an admin account, obtain a signed admin JWT, publish arbitrary messages to a production Kafka broker, and retrieve security answers for any user by email, potentially leading to full platform compromise and data exposure.
What the attacker needed
No authentication required; Knowledge of an email address; Internet access to the API
The fix
The report was resolved after the vendor fixed the issues, though the exact fix is not described.
How it was found
- Find the Swagger specification listing all API endpoints.
- Send a request to the Publishdata endpoint with a test message and observe it is accepted without authentication.
- Send a request to the TestDBConnection endpoint and receive a record count.
- Send a request to GetSQDetail with an email address and receive encrypted security answers.
- Send a request to CreateUser with admin role parameters and receive a new admin account.
- Send a request to GetAccessToken with the new credentials and receive a signed JWT with admin role.
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 platform had several web addresses (API endpoints) that anyone on the internet could use without logging in. One let anyone create a new admin account, another gave out a login token for that account, and others leaked database details and security answers. This meant a stranger could become the platform's administrator and see private information about all users.
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.