GHSL-2020-325: Authentication bypass in Nacos - CVE-2021-29441, CVE-2021-29442
Nacos authentication could be bypassed by sending a specific User-Agent header, allowing access to any console or REST API endpoint. Additionally, an unprotected endpoint allowed unauthenticated users to execute SQL queries against the embedded Derby database.
Originally disclosed on GitHub Security Lab
When enabled, Nacos authentication can be bypassed which enables an attacker to access any console or REST API endpoints.
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 report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could perform any administrative tasks on the Nacos server, and if embedded Derby storage is used, could query or wipe the database.
What the attacker needed
Authentication enabled; network access to Nacos server; embedded Derby storage for issue 2
The fix
The issues were fixed in version 1.4.1.
How it was found
- Send a request to the configuration endpoint without credentials; it is rejected with 403.
- Send the same request with the User-Agent header set to Nacos-Server; it is accepted.
- Send a GET request to the /derby endpoint with a SQL query to list database tables; it returns the table list without authentication.
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.
Nacos is a server that helps manage configurations and services. The report found that if you set a special header in your web request, the server would skip checking your username and password, letting anyone do admin actions. Also, a database query page was left open without any login check.
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.