{"id":"CVE-2023-46115","aliases":["CVE-2023-46115","GHSA-2rcp-jvr4-r259"],"related":[],"kind":"vulnerability","state":"published","title":"Updater Private Keys Possibly Leaked via Vite Environment Variables in tauri-cli","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThis 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.\n\nThe Tauri documentation used an insecure example configuration in the [Vite guide](https://tauri.app/v1/guides/getting-started/setup/vite/) to showcase how to use Tauri together with Vite. \n\nCopying the following snippet `envPrefix: ['VITE_', 'TAURI_'],` from this guide into the `vite.config.ts` of a Tauri project possibly leads to bundling the `TAURI_PRIVATE_KEY` and `TAURI_KEY_PASSWORD` into the Vite frontend code and therefore leaking this value to the debug built of a Tauri application.\n\nThe value is automatically bundled into debug builds but for production builds it is not embedded, as long as it is not directly referenced in the frontend code. Vite statically replaces these values in production builds. This reduces the amount of affected applications to a very small amount of affected applications.\n\nTo verify if you are affected you can search for the private key value or the `TAURI_PRIVATE_KEY` variable inside the release build frontend assets (`dist/`).\n\n> Example: `grep -r \"TAURI_PRIVATE_KEY\" dist/`\n\nUsing only the `envPrefix: ['VITE_'],` or any other framework than Vite means you are not impacted by this advisory.\n\n### Patches\n\nThe documentation has been patched but as the root cause is not in Tauri itself the issue is not fixed by updating Tauri.\nThe `vite.config.ts` configuration of the project needs to be adapted.\n\nWe recommend rotating your updater private key if you 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.\n\n### Workarounds\n\nThe `envPrefix: ['VITE_'],`should be used and the desired `TAURI` variables manually added.\nRespective these variables could be added `TAURI_PLATFORM`, `TAURI_ARCH`, `TAURI_FAMILY`, `TAURI_PLATFORM_VERSION`, `TAURI_PLATFORM_TYPE` and `TAURI_DEBUG` without leaking sensitive information.\n\nWe urge affected users to implement the workaround as the `1.x` branch will not receive a general prevention fix as it would break systems.\n\n### References\nThe issue was originally disclosed in our discord [here](https://discord.com/channels/616186924390023171/1164260301655523409).\nThe affected guide is [https://tauri.app/v1/guides/getting-started/setup/vite/](https://tauri.app/v1/guides/getting-started/setup/vite/).\n\n\n> Update: We lowered the severity from high to low, as the likelihood of impact was found to only affect a **very limited** amount of applications.\n\n> Update2: We changed the affected versions to make clear that after `2.0.0-alpha.16` or `1.5.6` the potentially vulnerable recommendation was no longer visible on our website and should not affect projects by default. A lot of users were confused and we believe this advisory reached the necessary user base.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Tauri es un framework para crear archivos binarios para las principales plataformas de escritorio. Este aviso no describe una vulnerabilidad en el código base de Tauri en sí, sino una configuración incorrecta de uso común que podría provocar la filtración de la clave privada y la contraseña de la clave de actualización en aplicaciones Tauri empaquetadas que utilizan la interfaz Vite en una configuración específica. La documentación de Tauri utilizó una configuración de ejemplo insegura en \"Vite guide\" para mostrar cómo usar Tauri junto con Vite. Copiar el siguiente fragmento `envPrefix: ['VITE_', 'TAURI_'],` de esta guía en `vite.config.ts` de un proyecto Tauri lleva a agrupar `TAURI_PRIVATE_KEY` y `TAURI_KEY_PASSWORD` en el código de interfaz de Vite y por lo tanto filtrar este valor a la aplicación Tauri lanzada. El uso de `envPrefix: ['VITE_'],` o cualquier otro marco que no sea Vite significa que este aviso no lo afecta. Se recomienda a los usuarios que roten su clave privada de actualización si se ven afectados por esto (requiere Tauri CLI &gt;=1.5.5). Después de actualizar la configuración de envPrefix, genere una nueva clave privada con `tauri signer generate`, guarde la nueva clave privada y actualice el valor `pubkey` del actualizador en `tauri.conf.json` con la nueva clave pública. Para actualizar su aplicación existente, la siguiente compilación de la aplicación debe firmarse con la clave privada anterior para que la aplicación existente la acepte.","source":"nvd"}],"published":"2023-10-19T23:35:03.875Z","modified":"2026-09-10T03:50:03.379Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","score":8.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","score":8.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","score":8.4,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-200","CWE-522"],"affected":[{"ranges":[{"version":">= 2.0.0-alpha.0, < 2.0.0-alpha.16","status":"affected"},{"version":">= 1.0.0, < 1.5.6","status":"affected"}],"vendor":"tauri-apps","product":"tauri","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0-alpha.0","status":"affected","fixed":"2.0.0-alpha.16"}],"ecosystem":"crates.io","package":"tauri-cli","purl":"pkg:cargo/tauri-cli","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.0.0-alpha.0","status":"affected","fixed":"2.0.0-alpha.16"}],"ecosystem":"npm","package":"@tauri-apps/cli","purl":"pkg:npm/%40tauri-apps/cli","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.5.6"}],"ecosystem":"npm","package":"@tauri-apps/cli","purl":"pkg:npm/%40tauri-apps/cli","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.5.6"}],"ecosystem":"crates.io","package":"tauri-cli","purl":"pkg:cargo/tauri-cli","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"},{"status":"affected","version":"2.0.0"}],"vendor":"tauri","product":"tauri","cpe":"cpe:2.3:a:tauri:tauri:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/tauri-apps/tauri/security/advisories/GHSA-2rcp-jvr4-r259","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://tauri.app/v1/guides/getting-started/setup/vite/","tags":["product","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-46115","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/tauri-apps/tauri/commit/8b166e9bf82e69ddb3200a3a825614980bd8d433","tags":["web"],"sources":["ghsa"]},{"url":"https://discord.com/channels/616186924390023171/1164260301655523409","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tauri-apps/tauri","tags":["package"],"sources":["ghsa"]},{"url":"https://tauri.app/v1/guides/getting-started/setup/vite","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-09-12T15:50:11.390Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-46115","url":"https://www.cve.org/CVERecord?id=CVE-2023-46115","licence":"CVE Terms of Use","modified":"2024-09-12T15:50:32.414Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2rcp-jvr4-r259","url":"https://github.com/advisories/GHSA-2rcp-jvr4-r259","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:03.379Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-46115","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-46115","licence":"Public domain","modified":"2026-06-17T06:30:10.760Z"}],"updatedAt":"2026-11-25T22:58:28.959Z","epss":{"score":0.00204,"percentile":0.10983,"date":"2026-12-01T12:00:22.000Z"}}