In BookStack greater than or equal to 0.18.0 and less than 0.29.2, there is an XSS vulnerability in comment creation. A user with…
GitHub_M·CWE-79·Published 2020-05-07
In BookStack greater than or equal to 0.18.0 and less than 0.29.2, there is an XSS vulnerability in comment creation. A user with permission to create comments could POST HTML directly to the system to be saved in a comment, which would then be executed/displayed to others users viewing the comment. Through this vulnerability custom JavaScript code could be injected and therefore ran on other user machines. This most impacts scenarios where not-trusted users are given permission to create comments. This has been fixed in 0.29.2.
In BookStack greater than or equal to 0.18.0 and less than 0.29.2, there is an XSS vulnerability in comment creation. A user with permission to create comments could POST HTML directly to the system to be saved in a comment, which would then be executed/displayed to others users viewing the comment. Through this vulnerability custom JavaScript code could be injected and therefore ran on other user machines. This most impacts scenarios where not-trusted users are given permission to create comments. This has been fixed in 0.29.2.
### Impact A user with permission to create comments could POST HTML directly to the system to be saved in a comment, which would then be executed/displayed to others users viewing the comment. Through this vulnerability custom JavaScript code could be injected and therefore ran on other user machines. This most impacts scenarios where not-trusted users are given permission to create comments. ### Patches The issue was addressed in BookStack v0.29.2. After upgrading, The command `php artisan bookstack:regenerate-comment-content` should be ran to remove any pre-existing dangerous content. ### Workarounds Comments can be disabled in the system settings to prevent them being shown to users. Alternatively, comment creation permissions can be altered as required to only those who are trusted but this will not address existing exploitation of this vulnerability. ### References * [BookStack Beta v0.29.2](https://github.com/BookStackApp/BookStack/releases/tag/v0.29.2) * JVN#41035278 * [BookStack Blog Post](https://bookstackapp.com/blog/beta-release-v0-29-2/) ### For more information If you have any questions or comments about this advisory: * Open an issue in [the BookStack GitHub repository](BookStackApp/BookStack/issues). * Ask on the [BookStack Discord chat](https://discord.gg/ztkBqR2). * Follow the [BookStack Security Advice](https://github.com/BookStackApp/BookStack#-security) to contact someone privately.
### Impact A user with permission to create comments could POST HTML directly to the system to be saved in a comment, which would then be executed/displayed to others users viewing the comment. Through this vulnerability custom JavaScript code could be injected and therefore ran on other user machines. This most impacts scenarios where not-trusted users are given permission to create comments. ### Patches The issue was addressed in BookStack v0.29.2. After upgrading, The command `php artisan bookstack:regenerate-comment-content` should be ran to remove any pre-existing dangerous content. ### Workarounds Comments can be disabled in the system settings to prevent them being shown to users. Alternatively, comment creation permissions can be altered as required to only those who are trusted but this will not address existing exploitation of this vulnerability. ### References * [BookStack Beta v0.29.2](https://github.com/BookStackApp/BookStack/releases/tag/v0.29.2) * JVN#41035278 * [BookStack Blog Post](https://bookstackapp.com/blog/beta-release-v0-29-2/) ### For more information If you have any questions or comments about this advisory: * Open an issue in [the BookStack GitHub repository](BookStackApp/BookStack/issues). * Ask on the [BookStack Discord chat](https://discord.gg/ztkBqR2). * Follow the [BookStack Security Advice](https://github.com/BookStackApp/BookStack#-security) to contact someone privately.
En BookStack versiones posteriores o igual a 0.18.0 y versiones menores a 0.29.2, se presenta una vulnerabilidad de tipo XSS en la creación de comentarios. Un usuario con permiso para crear comentarios podría PUBLICAR HTML directamente en el sistema para ser guardado en un comentario, que luego es ejecutado y desplegado a otros usuarios que visualicen el comentario. Por medio de esta vulnerabilidad, el código JavaScript personalizado podría ser inyectado y, por lo tanto, ejecutarse en otras máquinas de usuario. Esto impacta más a los escenarios en los que los usuarios no confiables se le otorgan permiso para crear comentarios. Esto se ha corregido en 0.29.2.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 2.0 | Primary | NVD | 3.5 | 6.8 | 2.9 | AV:N/AC:M/Au:S/C:N/I:P/A:N |
| 3.1 | Primary | cve.org | 6.3 | — | — | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| 3.1 | Primary | NVD | 5.4 | 2.3 | 2.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| 3.1 | Secondary | NVD | 6.3 | 2.8 | 3.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| 3.1 | Secondary | GHSA | 6.3 | — | — | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |