Cleartext password exposure allows access to the desafio5estrelas.com admin panel
The administrator login password for the site was hard-coded in a client-side JavaScript file, so anyone who viewed the source could read it. An attacker could then log in to the admin panel and access survey data and user IDs that could be used to impersonate users on the site.
- Triaged in 17 hours
- Fixed in 17 days
- Paid in 30 days
- Disclosed after 2.9 years
Summary by the program
Vendor created and managed site desafio5estrelas.com exposes an administrator login password through the javascript source. This site was used by Uber in Portugal to encourage low-rated drivers to raise their ratings.This password allowed remote users access to the administrator panel of the site, which exposed data collected through the in-game surveys, as well as user IDs which can be used to log in as the user within this site.
Summary by the researcher
Hard coded password for admin panel in the JavaScript file.
What the report shows
The target is desafio5estrelas.com, a site that the report says was created and managed by a vendor and used by Uber in Portugal to encourage low-rated drivers to raise their ratings. The feature at issue is the site's administrator login.
The researcher's summary is one line: a hard coded password for the admin panel was present in the JavaScript file. The program's summary describes the same finding from the other side: the site exposed an administrator login password through the JavaScript source.
The steps, as far as the report sets them out, are:
- Review the JavaScript served by the site.
- Find an administrator password written directly into that JavaScript.
- Use the password to reach the administrator panel of the site.
The report does not include the JavaScript file, the URL it was served from, the password, or any request or response. There is no reproduction detail beyond the description above, so there is nothing to copy into a request block here.
The outcome is recorded as a medium severity finding under the weakness Cleartext Storage of Sensitive Information, with a bounty of 500.00 USD, disclosed on 2021-03-30. The report does not describe a fix.
Root cause
The likely mistake is that a credential needed to authenticate to the administrator panel was embedded in client-side code. Anything shipped to the browser is readable by anyone who loads the page, so a password placed in a JavaScript file is effectively published. The report does not say how the password was used by the application (whether it was compared client-side, submitted to a login form, or used to call an API), only that it allowed access to the panel.
Impact
According to the program's summary, the password allowed remote users to access the administrator panel. From there, the report says, the data collected through the in-game surveys was exposed, along with user IDs that could be used to log in as the user within the site. Those are the two consequences the report names: survey data and the ability to log in as a user on the site via user IDs.
How this kind of bug works
Single-page applications and script-driven sites often need configuration and sometimes credentials in the browser. When a secret is placed in a JavaScript bundle, a JSON config file or an inline script, it is delivered to every visitor. Minification and bundling do not hide it: the value is still present in the file the browser downloads, and source maps, if published, make reading it easier still. The same applies to secrets in HTML comments, in mobile app packages, and in public repositories.
The reason it happens is usually a design shortcut: the developer needs the front end to talk to a backend or to gate a page, and hard coding the credential is the quickest route. The defence is to keep secrets server-side, authenticate users with per-user sessions or tokens, and enforce authorisation on the server for every administrative action, so that possession of a string in the client is never sufficient.
How to test for it
- Map the client-side surface: list the JavaScript files the application loads, including vendor bundles, configuration files and any inline scripts in the HTML.
- Fetch each file and search it for credential-like strings: names such as password, passwd, pwd, secret, token, apiKey, admin, auth, and values that look like passwords or keys. Search for the admin panel's own paths and hostnames too, since they often appear next to the credential.
- Check for source maps and other build artefacts that may expose unminified source.
- If a candidate credential is found, test it against the login or API endpoint it appears to belong to, using your own account context and staying within the program's rules.
- A positive result is a value from client-side code that the server accepts as authentication or authorisation for a privileged function, demonstrated with a request and response showing access you should not have.
Common false positives: placeholder or example values, keys that are public by design (for example, publishable keys for services that expect them in the browser), credentials that are expired or scoped to nothing, and strings that merely look like secrets. Confirm acceptance by the server before reporting.
How it is fixed
Remove the secret from all client-side code and rotate it, since it must be assumed compromised. Replace shared passwords with per-user authentication and server-side session or token checks. Enforce authorisation on the server for every administrative endpoint, so the client cannot grant itself access. Keep configuration that the browser genuinely needs separate from secrets, and add secret scanning to the build and review process to catch future leaks.
Hunting notes
This bug class tends to hide in administrative or internal tooling that was built quickly, in sites run by third-party vendors on behalf of a larger organisation, and in older parts of an application that predate a move to proper authentication. Recon signals worth following: JavaScript bundles that reference admin paths, login forms whose validation appears to happen entirely in the browser, and vendor-built microsites linked from a main brand.
To make the report land, show the server accepting the credential: the request, the response, and the privileged data or action reached. State clearly what an attacker gains, as this report does with survey data and user IDs, and keep the demonstration minimal so the triager can reproduce it without guesswork.
What happened, in plain words
This report is about a website called desafio5estrelas.com. According to the report, the site was created and managed by a vendor and was used by Uber in Portugal to encourage drivers with low ratings to improve them. The site had an administrator login, a private entrance meant only for the people who run it.
The problem was simple to describe. The password for that administrator login was written directly into the JavaScript file of the site. JavaScript is the code that runs in your browser to make a web page interactive, for example showing menus or checking a form as you type. Because the browser has to download that code to run it, anyone who visits the site can also read it. A password sitting in that code is therefore not private at all: it is handed to every visitor, whether they are meant to see it or not.
The researcher's summary says exactly this: a hard coded password for the admin panel was in the JavaScript file. The program's summary describes the same finding from the other side: the site exposed an administrator login password through the JavaScript source.
The steps, as far as the report sets them out, are:
- Review the JavaScript served by the site.
- Find an administrator password written directly into that JavaScript.
- Use the password to reach the administrator panel of the site.
The report does not include the JavaScript file, the URL it was served from, the password, or any request or response, so there is no code to copy here.
Why does each step matter? Reading the JavaScript is something any visitor can do with a browser, so it is the natural first place to look for secrets. Finding a password there means the secret is already public. Using it to reach the panel shows the impact: the password is not just a leftover string, it opens the door.
According to the program's summary, that door led somewhere sensitive. The password allowed remote users to access the administrator panel. From there, the report says, the data collected through the in-game surveys was exposed, along with user IDs that could be used to log in as the user within the site. In other words, two things were exposed: the data collected through the in-game surveys, and user IDs that could be used to log in as the user on that site. The report does not say how many users or records were affected.
The finding was recorded as medium severity under the weakness Cleartext Storage of Sensitive Information, with a bounty of 500.00 USD, disclosed on 2021-03-30. The report does not describe a fix.
In general, how this kind of bug works
A website is split into two halves. The server is the computer that stores the data and decides who is allowed to do what. The client is your browser, which receives pages, images and code and displays them. Anything the server sends to the client can be read by the person using the browser. There is no hidden compartment: if the browser can see it, you can see it too, with the developer tools built into every browser.
A useful comparison is a shop. The server is the back office with the safe. The client is the shop floor that customers walk around. Writing a password into JavaScript is like taping the safe combination to the shop floor wall: every customer who walks past can read it.
This mistake usually happens for a practical reason. A developer needs the page to talk to a backend system, or needs to protect an admin page quickly, and putting the password in the code is the fastest route. Minifying the code (squashing it to save space) or bundling many files into one does not help, because the value is still in the file the browser downloads. The same problem appears in HTML comments, in mobile app packages and in public code repositories.
The right approach is to keep secrets on the server, give each person their own login with a session or token, and check permissions on the server for every administrative action. Then holding a string found in the browser is never enough on its own.
How to test for it
- List the JavaScript files the site loads, including third-party bundles, configuration files and any scripts written directly into the HTML.
- Download each file and search it for words that suggest credentials, such as password, secret, token, apiKey, admin or auth, and for values that look like passwords or keys. Also search for the admin panel's own paths and hostnames, since they often sit next to the credential.
- Look for source maps, files that map compressed code back to readable source and can make the search easier.
- If you find a candidate password, test it against the login or API endpoint it seems to belong to, using your own account and staying within the program's rules.
- A real finding is a value from the browser's code that the server accepts as proof of identity or permission for a privileged action, shown with a request and response that demonstrate access you should not have.
Watch out for false positives: placeholder or example values, keys that are public by design (some services expect their publishable keys in the browser), expired credentials, and strings that merely look like secrets. Confirm the server accepts the value before reporting.
How it is fixed
Remove the secret from all code sent to the browser and change it, because it must be assumed compromised. Replace shared passwords with per-user logins and server-side session or token checks. Enforce permissions on the server for every administrative endpoint, so the browser cannot grant itself access. Keep configuration the browser genuinely needs separate from secrets, and add secret scanning to the build and review process to catch future leaks.
Where to look
This kind of bug tends to hide in administrative or internal tools built quickly, in sites run by third-party vendors on behalf of a larger organisation, and in older parts of an application that predate proper authentication. Signals worth following: JavaScript files that mention admin paths, login forms whose checks appear to happen entirely in the browser, and vendor-built microsites linked from a main brand.
To make a report land, show the server accepting the credential: the request, the response, and the privileged data or action reached. State clearly what an attacker gains, as this report does with survey data and user IDs, and keep the demonstration minimal so it can be reproduced without guesswork.
Glossary
- JavaScript: the programming language that runs in your browser to make web pages interactive.
- Client-side code: code that is sent to and runs in the browser, and can therefore be read by anyone.
- Server: the computer that stores data and decides who may access it.
- Admin panel: a private area of a website used by its administrators to manage it.
- Hard coded: written directly into the code as a fixed value, rather than stored securely elsewhere.
- Credential: a piece of information, such as a password, used to prove who you are.
- Cleartext Storage of Sensitive Information: a weakness category for storing secrets in a form that is not protected.
- Severity: a rating of how serious a finding is, here medium.
- Bounty: a reward paid to a researcher for reporting a valid security issue.
- Disclosure: the date a report is made public.
- Source map: a file that maps compressed code back to its original readable form.
- Minification: squashing code to save space, which does not hide values inside it.
- Session: a server-side record of a logged-in user, usually referenced by a cookie.
- Token: a value issued to a user that proves their identity or permissions.
- API endpoint: a URL the browser calls to send or receive data from the server.
- False positive: a finding that looks like a problem but is not one.
- Account takeover: gaining access to another person's account.
- User ID: an identifier for a user, which in this report could be used to log in as that user on the site.