# CVE-2024-35222: iFrames Bypass Origin Checks for Tauri API Access Control

> Attackers can bypass origin checks to invoke privileged Tauri IPC commands via malicious iframes, potentially executing arbitrary actions or modifying data.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 23 May 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-57fm-592m-34r7

## What is CVE-2024-35222?

CVE-2024-35222 is a medium-severity vulnerability in tauri-apps tauri, published on 23 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Tauri is a framework for building binaries for all major desktop platforms. Remote origin iFrames in Tauri applications can access the Tauri IPC endpoints without being explicitly allowed in the `dangerousRemoteDomainIpcAccess` in v1 and in the `capabilities` in v2. Valid commands with potentially unwanted consequences ("delete project", "transfer credits", etc.) could be invoked by an attacker that controls the content of an iframe running inside a Tauri app. This vulnerability has been patched in versions 1.6.7 and 2.0.0-beta.19.

Weakness: CWE-284 (Improper Access Control)

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

4 open source packages ship an affected version, including tauri.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tauri` | crates.io | All versions | 1.6.7 |
| `tauri` | crates.io | All versions | 1.6.7 |
| `tauri` | crates.io | From 2.0.0-beta.0 | 2.0.0-beta.20 |
| `tauri` | crates.io | From 2.0.0-beta.0 | 2.0.0-beta.20 |

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

Upgrade tauri to a fixed version for your release line: 1.6.7 or 2.0.0-beta.20.

## Is CVE-2024-35222 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2024-35222 is a medium-severity vulnerability in tauri-apps tauri, published on 23 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-35222 exists.

Affected packages and fixed versions:
- tauri (crates.io): affected all versions; fixed in 1.6.7
- tauri (crates.io): affected all versions; fixed in 1.6.7
- tauri (crates.io): affected from 2.0.0-beta.0; fixed in 2.0.0-beta.20
- tauri (crates.io): affected from 2.0.0-beta.0; fixed in 2.0.0-beta.20

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

## Sources

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

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