CVE-2024-35223: Github.com/dapr/dapr Dapr API Token Exposure Vulnerability
MODERATECVE-2024-35223 is a MODERATE (CVSS 5.3) dapr api token exposure vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Github.com/dapr/dapr libraries in the Go ecosystem. The issue involves dapr api token exposure. Remediation is available by upgrading affected packages to version 1.13.3.
CVE-2024-35223 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2024-35223
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.13.3
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-2024-35223, 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.13.3), 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. 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-2024-35223 Affected Github.com/dapr/dapr Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/dapr/dapr
|
Go |
≥ 1.13.0
< 1.13.3
|
1.13.3
|
References
Frequently Asked Questions
What is CVE-2024-35223?
Which Github.com/dapr/dapr versions are affected?
What version fixes CVE-2024-35223?
Is github.com/dapr/dapr affected?
What is the CVSS score of CVE-2024-35223?
What CWE is associated with CVE-2024-35223?
How can I check Go dependencies for CVE-2024-35223?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-284c-x8m7-9w5h",
"modified" : "2024-05-29T21:00:59Z",
"published" : "2024-05-22T18:47:58Z",
"aliases" : [ "CVE-2024-35223" ],
"summary" : "Dapr API Token Exposure",
"details" : "### **Summary**\n\nA vulnerability has been found in Dapr that causes a leak of the application token of the invoker app to the invoked app when using Dapr as a gRPC proxy for remote service invocation. This issue arises because Dapr sends the app token of the invoker app instead of the app token of the invoked app.\n\nUsers who leverage Dapr for gRPC proxy service invocation and are using the app API token feature are encouraged to upgrade Dapr to version [1.13.3](https://github.com/dapr/dapr/releases/tag/v1.13.3). \n\n### Impact\n\nThis vulnerability impacts Dapr users who use Dapr as a gRPC proxy for remote service invocation as well as the [Dapr App API token](https://docs.dapr.io/operations/security/app-api-token/) functionality. An attacker could exploit this vulnerability to gain access to the app token of the invoker app, potentially compromising security and authentication mechanisms.\n\n### Patches\n\nThe issue has been fixed in Dapr version [1.13.3](https://github.com/dapr/dapr/releases/tag/v1.13.3).\n\n### Details\n\nDapr uses two types of tokens for authentication:\n\n- `APP_API_TOKEN`: Used by Dapr to authenticate to the app.\n- `DAPR_API_TOKEN`: Used by the app to authenticate to Dapr.\n\nDapr uses the `dapr-api-token` metadata in gRPC calls (or header, for HTTP calls) for authentication.\n\n- In communication from dapr to the app, the `dapr-api-token` metadata field will carry the `APP_API_TOKEN`.\n- In communication from the app to daprd, the `dapr-api-token` metadata field will carry the `DAPR_API_TOKEN`.\n\nBefore version 1.13.0, the `APP_API_TOKEN` was not being sent to the invoked app for authentication, as reported in [this issue](https://github.com/dapr/dapr/issues/7344). Instead, Dapr was incorrectly using the same `DAPR_API_TOKEN` that the invoker app had passed to Dapr. This was addressed in [PR #7404](https://github.com/dapr/dapr/pull/7404), but the fix only worked for self-invocation scenarios.\n\nWhen Dapr needed to communicate with another instance, it would mistakenly include the `APP_API_TOKEN` of the invoker app in the request. This behavior is incorrect, app tokens should never be included in requests between Dapr sidecars. This vulnerability allows the receiving app to see the app token of the invoker app, leading to potential misuse and security breaches.\n\nThe vulnerability is addressed by ensuring that Dapr uses the correct app token (of the invoked app) during gRPC proxy service invocation.\n\n### References\n\n- https://docs.dapr.io/operations/security/app-api-token/\n- https://github.com/dapr/dapr/issues/7344\n- https://github.com/dapr/dapr/pull/7404 \n\n### Credits\n\nThanks to [Benjamin Delay](mailto:benjamin.delay@gmail.com) for reporting this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/dapr/dapr"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.13.0"
}, {
"fixed" : "1.13.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/dapr/dapr/security/advisories/GHSA-284c-x8m7-9w5h"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-35223"
}, {
"type" : "WEB",
"url" : "https://github.com/dapr/dapr/issues/7344"
}, {
"type" : "WEB",
"url" : "https://github.com/dapr/dapr/pull/7404"
}, {
"type" : "WEB",
"url" : "https://github.com/dapr/dapr/commit/e0591e43d0cdfd30a2f2960dce5d9892dc98bc2c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/dapr/dapr"
}, {
"type" : "WEB",
"url" : "https://github.com/dapr/dapr/releases/tag/v1.13.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-22T18:47:58Z",
"nvd_published_at" : "2024-05-23T09:15:09Z"
}
}