# CVE-2022-46171: Tauri vulnerable to path traversal

> Tauri framework allows attackers to read files in subdirectories of allowed paths due to incorrect wildcard handling in filesystem glob patterns.

- **Severity:** Medium 6.8 (`CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Dec 2022
- **Updated:** 15 Apr 2025
- **Also known as:** GHSA-6mv3-wm7j-h4w5

## What is CVE-2022-46171?

CVE-2022-46171 is a medium-severity path traversal vulnerability in tauri-apps tauri, published on 23 Dec 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Tauri is a framework for building binaries for all major desktop platforms. The filesystem glob pattern wildcards `*`, `?`, and `[...]` match file path literals and leading dots by default, which unintentionally exposes sub folder content of allowed paths. Scopes without the wildcards are not affected. As `**` allows for sub directories the behavior there is also as expected. The issue has been patched in the latest release and was backported into the currently supported 1.x branches. There are no known workarounds at the time of publication.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2022-46171?

8 open source packages ship an affected version, including tauri. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tauri` | crates.io | From 1.0.0 | 1.0.8 |
| `tauri` | crates.io | From 1.0.0 | 1.0.8 |
| `tauri` | crates.io | From 1.1.0 | 1.1.3 |
| `tauri` | crates.io | From 1.1.0 | 1.1.3 |
| `tauri` | crates.io | From 1.2.0 | 1.2.3 |
| `tauri` | crates.io | From 1.2.0 | 1.2.3 |
| `tauri` | crates.io | From 2.0.0-alpha.0 | 2.0.0-alpha.2 |
| `tauri` | crates.io | From 2.0.0-alpha.0 | 2.0.0-alpha.2 |

Products: Tauri Tauri.

## How do I fix CVE-2022-46171?

Upgrade tauri to a fixed version for your release line: 1.0.8, 1.1.3, 1.2.3 or 2.0.0-alpha.2.

## Is CVE-2022-46171 being exploited?

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

## Other vulnerabilities in tauri-apps tauri

- [CVE-2023-46115](https://insights.sbomify.com/CVE-2023-46115/): Updater Private Keys Possibly Leaked via Vite Environment Variables in tauri-cli (high 8.4)
- [CVE-2022-39215](https://insights.sbomify.com/CVE-2022-39215/): The readDir Endpoint Scope can be Bypassed With Symbolic Links in Tauri (high 8.3)
- [CVE-2026-42184](https://insights.sbomify.com/CVE-2026-42184/): Tauri: Origin Confusion Allows Remote Pages to Invoke Local-Only IPC Commands (medium 6.1)
- [CVE-2023-34460](https://insights.sbomify.com/CVE-2023-34460/): Tauri vulnerable to Regression on Filesystem Scope Checks for Dotfiles (medium 4.8)
- [CVE-2023-31134](https://insights.sbomify.com/CVE-2023-31134/): Tauri Open Redirect Vulnerability Possibly Exposes IPC to External Sites (medium 4.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-46171 and fix it if it is affected.

What it is: CVE-2022-46171 is a medium-severity path traversal vulnerability in tauri-apps tauri, published on 23 Dec 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-46171 exists.

Affected packages and fixed versions:
- tauri (crates.io): affected from 1.0.0; fixed in 1.0.8
- tauri (crates.io): affected from 1.0.0; fixed in 1.0.8
- tauri (crates.io): affected from 1.1.0; fixed in 1.1.3
- tauri (crates.io): affected from 1.1.0; fixed in 1.1.3
- tauri (crates.io): affected from 1.2.0; fixed in 1.2.3
- tauri (crates.io): affected from 1.2.0; fixed in 1.2.3
- tauri (crates.io): affected from 2.0.0-alpha.0; fixed in 2.0.0-alpha.2
- tauri (crates.io): affected from 2.0.0-alpha.0; fixed in 2.0.0-alpha.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-2022-46171/ (Markdown: https://insights.sbomify.com/CVE-2022-46171/index.md)
```

## Sources

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

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