CVE-2024-35223: Github.com/dapr/dapr Dapr API Token Exposure Vulnerability

MODERATE
Advisory Identifier: GHSA-284c-x8m7-9w5h
CVSS 5.3
CWE-200
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2024-35223
GHSA Identifier GHSA-284c-x8m7-9w5h
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Github.com/dapr/dapr
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (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.

github.com/dapr/dapr fixed: 1.13.3
Upgrade github.com/dapr/dapr to 1.13.3
Verify Direct and Transitive Dependencies

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

### **Summary** A 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. Users 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). ### Impact This 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. ### Patches The issue has been fixed in Dapr version [1.13.3](https://github.com/dapr/dapr/releases/tag/v1.13.3). ### Details Dapr uses two types of tokens for authentication: - `APP_API_TOKEN`: Used by Dapr to authenticate to the app. - `DAPR_API_TOKEN`: Used by the app to authenticate to Dapr. Dapr uses the `dapr-api-token` metadata in gRPC calls (or header, for HTTP calls) for authentication. - In communication from dapr to the app, the `dapr-api-token` metadata field will carry the `APP_API_TOKEN`. - In communication from the app to daprd, the `dapr-api-token` metadata field will carry the `DAPR_API_TOKEN`. Before 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. When 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. The vulnerability is addressed by ensuring that Dapr uses the correct app token (of the invoked app) during gRPC proxy service invocation. ### References - https://docs.dapr.io/operations/security/app-api-token/ - https://github.com/dapr/dapr/issues/7344 - https://github.com/dapr/dapr/pull/7404 ### Credits Thanks to [Benjamin Delay](mailto:benjamin.delay@gmail.com) for reporting this issue.

CVE-2024-35223 Affected Github.com/dapr/dapr Versions

1 component(s)
Fixed Versions:
1.13.3
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?
CVE-2024-35223 is a security vulnerability in Github.com/dapr/dapr involving Dapr API Token Exposure under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Github.com/dapr/dapr versions are affected?
Affected versions include releases prior to 1.13.3 across affected packages: github.com/dapr/dapr.
What version fixes CVE-2024-35223?
Upgrading to 1.13.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/dapr/dapr affected?
Yes, github.com/dapr/dapr is affected in releases prior to 1.13.3. Upgrade your dependency to 1.13.3 or later.
What is the CVSS score of CVE-2024-35223?
CVE-2024-35223 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2024-35223?
CVE-2024-35223 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check Go dependencies for CVE-2024-35223?
Run the dependency tree command: 'inspect dependencies for github.com/dapr/dapr'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}