Is it possible in anyway to have cross-site scripting attacks in tauri #11060
-
I was reviewing csp and cookies, I couldn't figure out a way that allows cross-site scripting attacks via JS(anyway atleast) with tauri. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hey, I am a little bit confused about your goal? Do you want to change the default CSP? Do you want to change the example CSP from our security docs? The default CSP value in Tauri is Speaking about XSS (cross site scripting), that it is an attack vector we assume and considered when building Tauri. Our security model tries to empower developers to only provide the absolute minimum permissions to the frontend code in term of system access. Since Tauri does support basically all common frontend frameworks and vanilla JavaScript it is entirely possible to have XSS attacks in Tauri apps. It all depends on how well the frontend sanitizes and validates user provided input. A compromised frontend via XSS has the same API Access exposed to the window. Impact depends on exposed APIs. |
Beta Was this translation helpful? Give feedback.
Hey, I am a little bit confused about your goal? Do you want to change the default CSP? Do you want to change the example CSP from our security docs?
The default CSP value in Tauri is
null
which means no CSP is enabled or enforced by default (which may change in the future).The CSP example in our security docs does allow a little bit more than just the absolute minimum but no
unsafe-inline
except for styles.Speaking about XSS (cross site scripting), that it is an attack vector we assume and considered when building Tauri. Our security model tries to empower developers to only provide the absolute minimum permissions to the frontend code in term of system access. Since Tauri does support…