Skip to content

Dapr API Token Exposure

Moderate severity GitHub Reviewed Published May 22, 2024 in dapr/dapr • Updated Sep 17, 2024

Package

gomod github.com/dapr/dapr (Go)

Affected versions

>= 1.13.0, < 1.13.3

Patched versions

1.13.3

Description

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.

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

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. Instead, Dapr was incorrectly using the same DAPR_API_TOKEN that the invoker app had passed to Dapr. This was addressed in PR #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

Credits

Thanks to Benjamin Delay for reporting this issue.

References

@artursouza artursouza published to dapr/dapr May 22, 2024
Published to the GitHub Advisory Database May 22, 2024
Reviewed May 22, 2024
Published by the National Vulnerability Database May 23, 2024
Last updated Sep 17, 2024

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

EPSS score

0.045%
(16th percentile)

Weaknesses

CVE ID

CVE-2024-35223

GHSA ID

GHSA-284c-x8m7-9w5h

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.