# CVE-2024-34706: @valtimo/components exposes access token to form.io

> Attackers with network access can steal JWT tokens exposed to Form.io, allowing them to read personal data or impersonate users.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 May 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-xcp4-62vj-cq3r

## What is CVE-2024-34706?

CVE-2024-34706 is a critical vulnerability in valtimo-platform valtimo-frontend-libraries, published on 13 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Valtimo is an open source business process and case management platform. When opening a form in Valtimo, the access token (JWT) of the user is exposed to `api.form.io` via the the `x-jwt-token` header. An attacker can retrieve personal information from this token, or use it to execute requests to the Valtimo REST API on behalf of the logged-in user. This issue is caused by a misconfiguration of the Form.io component.

The following conditions have to be met in order to perform this attack: An attacker needs to have access to the network traffic on the `api.form.io` domain; the content of the `x-jwt-token` header is logged or otherwise available to the attacker; an attacker needs to have network access to the Valtimo API; and an attacker needs to act within the time-to-live of the access token. The default TTL in Keycloak is 5 minutes.

Versions 10.8.4, 11.1.6 and 11.2.2 have been patched.

Weakness: CWE-532 (Insertion of Sensitive Information into Log File)

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

6 open source packages ship an affected version, including @valtimo/components.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@valtimo/components` | npm | All versions | 10.8.4 |
| `@valtimo/components` | npm | All versions | 10.8.4 |
| `@valtimo/components` | npm | From 11.0.0 | 11.1.6 |
| `@valtimo/components` | npm | From 11.0.0 | 11.1.6 |
| `@valtimo/components` | npm | From 11.2.0 | 11.2.2 |
| `@valtimo/components` | npm | From 11.2.0 | 11.2.2 |

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

Upgrade @valtimo/components to a fixed version for your release line: 10.8.4, 11.1.6 or 11.2.2.

## Is CVE-2024-34706 being exploited?

There is no known exploitation of CVE-2024-34706 in the wild and no public exploit code.

## Fix prompt for AI coding agents

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

What it is: CVE-2024-34706 is a critical vulnerability in valtimo-platform valtimo-frontend-libraries, published on 13 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-34706 in the wild and no public exploit code.

Affected packages and fixed versions:
- @valtimo/components (npm): affected all versions; fixed in 10.8.4
- @valtimo/components (npm): affected all versions; fixed in 10.8.4
- @valtimo/components (npm): affected from 11.0.0; fixed in 11.1.6
- @valtimo/components (npm): affected from 11.0.0; fixed in 11.1.6
- @valtimo/components (npm): affected from 11.2.0; fixed in 11.2.2
- @valtimo/components (npm): affected from 11.2.0; fixed in 11.2.2

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-34706/ (Markdown: https://insights.sbomify.com/CVE-2024-34706/index.md)
```

## Sources

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

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