# CVE-2024-35223: Dapr API Token Exposure

> Dapr leaks the invoker's app token to the invoked app during gRPC proxying, allowing attackers to compromise authentication mechanisms.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 May 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-284c-x8m7-9w5h, GO-2024-2879

## What is CVE-2024-35223?

CVE-2024-35223 is a medium-severity vulnerability in dapr, published on 23 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Dapr is a portable, event-driven, runtime for building distributed applications across cloud and edge. Dapr sends the app token of the invoker app instead of the app token of the invoked app. This causes of 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 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. This vulnerability was patched in version 1.13.3.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2024-35223?

3 open source packages ship an affected version, including github.com/dapr/dapr.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/dapr/dapr` | Go | From 1.13.0 | 1.13.3 |
| `github.com/dapr/dapr` | Go | From 1.13.0 | 1.13.3 |
| `github.com/dapr/dapr` | Go | From 1.13.0 | 1.13.3 |

## How do I fix CVE-2024-35223?

Upgrade github.com/dapr/dapr to 1.13.3 or later.

## Is CVE-2024-35223 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-35223 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-35223 and fix it if it is affected.

What it is: CVE-2024-35223 is a medium-severity vulnerability in dapr, published on 23 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-35223 exists.

Affected packages and fixed versions:
- github.com/dapr/dapr (Go): affected from 1.13.0; fixed in 1.13.3
- github.com/dapr/dapr (Go): affected from 1.13.0; fixed in 1.13.3
- github.com/dapr/dapr (Go): affected from 1.13.0; fixed in 1.13.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-35223/ (Markdown: https://insights.sbomify.com/CVE-2024-35223/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-35223
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-35223
- OSV: https://osv.dev/vulnerability/CVE-2024-35223

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-35223/
Summaries are generated and may contain mistakes; the official description above is the record.
