NoteGen before 0.32.0 grants the Tauri shell plugin shell:allow-execute capability for bash, python, and python3 with arbitrary arguments in the default desktop capabilities. JavaScript running in the application webview can therefore invoke plugin:shell|execute to run attacker-controlled operating system commands with the privileges of the NoteGen process. In combination with script execution in the webview (for example via chat XSS), this enables full remote code execution on the user's machine.
Affects the NoteGen desktop application on a default installation. Exploitation requires the ability to run script in the NoteGen webview (for example via a separate XSS issue) and then invoke the Tauri shell execute API. No non-default capability configuration is required on affected versions.
A proof of concept obtains JavaScript execution in the webview (via malicious skill-driven chat XSS) and then calls window.TAURI.core.invoke('plugin:shell|execute', { program: 'bash', args: ['-c', '<command>'], ... }) to open Calculator and exfiltrate local files to an attacker-controlled server.
Upgrade to NoteGen 0.32.0 or later. The fix removes shell:allow-execute entries that permitted bash, python, and python3 with attacker-controlled arguments from the default Tauri capabilities, closing the webview-to-OS command execution path.