BookStack before version 0.25.5 has a vulnerability where a user could upload PHP files through image upload functions, which would allow…
GitHub_M·CWE-95·Published 2020-03-09
BookStack before version 0.25.5 has a vulnerability where a user could upload PHP files through image upload functions, which would allow them to execute code on the host system remotely. They would then have the permissions of the PHP process. This most impacts scenarios where non-trusted users are given permission to upload images in any area of the application. The issue was addressed in a series of patches in versions 0.25.3, 0.25.4 and 0.25.5. Users should upgrade to at least v0.25.5 to avoid this vulnerability.
BookStack before version 0.25.5 has a vulnerability where a user could upload PHP files through image upload functions, which would allow them to execute code on the host system remotely. They would then have the permissions of the PHP process. This most impacts scenarios where non-trusted users are given permission to upload images in any area of the application. The issue was addressed in a series of patches in versions 0.25.3, 0.25.4 and 0.25.5. Users should upgrade to at least v0.25.5 to avoid this vulnerability.
### Impact A user could upload PHP files through image upload functions, which would allow them to execute code on the host system remotely. They would then have the permissions of the PHP process. This most impacts scenarios where non-trusted users are given permission to upload images in any area of the application. ### Patches The issue was addressed in a series of patches: v0.25.3, v0.25.4 and v0.25.5. Users should upgrade to at least v0.25.5 to avoid this patch but ideally the latest BookStack version as previous versions are un-supported. ### Workarounds Depending on BookStack version, you could use the [local_secure](https://www.bookstackapp.com/docs/admin/upload-config/#local-secure) image storage option, or use s3 or a similar compatible service. Preventing direct execution of any `php` files, apart from the `public/index.php` file, though web-server configuration would also prevent this. ### References [BookStack Beta v0.25.3](https://github.com/BookStackApp/BookStack/releases/tag/v0.25.3) [BookStack Beta v0.25.4](https://github.com/BookStackApp/BookStack/releases/tag/v0.25.4) [BookStack Beta v0.25.5](https://github.com/BookStackApp/BookStack/releases/tag/v0.25.5) ### 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 advise](https://github.com/BookStackApp/BookStack#-security) to contact someone privately.
### Impact A user could upload PHP files through image upload functions, which would allow them to execute code on the host system remotely. They would then have the permissions of the PHP process. This most impacts scenarios where non-trusted users are given permission to upload images in any area of the application. ### Patches The issue was addressed in a series of patches: v0.25.3, v0.25.4 and v0.25.5. Users should upgrade to at least v0.25.5 to avoid this patch but ideally the latest BookStack version as previous versions are un-supported. ### Workarounds Depending on BookStack version, you could use the [local_secure](https://www.bookstackapp.com/docs/admin/upload-config/#local-secure) image storage option, or use s3 or a similar compatible service. Preventing direct execution of any `php` files, apart from the `public/index.php` file, though web-server configuration would also prevent this. ### References [BookStack Beta v0.25.3](https://github.com/BookStackApp/BookStack/releases/tag/v0.25.3) [BookStack Beta v0.25.4](https://github.com/BookStackApp/BookStack/releases/tag/v0.25.4) [BookStack Beta v0.25.5](https://github.com/BookStackApp/BookStack/releases/tag/v0.25.5) ### 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 advise](https://github.com/BookStackApp/BookStack#-security) to contact someone privately.
BookStack versiones anteriores a 0.25.5, presenta una vulnerabilidad donde un usuario puede cargar archivos PHP por medio de funciones de carga de imágenes, lo que le permitiría ejecutar código sobre el sistema host remotamente. Luego tendrían los permisos del proceso de PHP. Esto impacta más a los escenarios donde los usuarios no confiables tienen permiso para cargar imágenes en cualquier área de la aplicación. El problema fue abordado en una serie de parches en las versiones 0.25.3, 0.25.4 y 0.25.5. Los usuarios deben actualizar al menos a la versión v0.25.5 para evitar esta vulnerabilidad.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 2.0 | Primary | NVD | 9.0 | 8.0 | 10.0 | AV:N/AC:L/Au:S/C:C/I:C/A:C |
| 3.1 | Primary | NVD | 8.8 | 2.8 | 5.9 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | Primary | cve.org | 7.9 | — | — | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L |
| 3.1 | Primary | cve.org | 7.9 | — | — | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L |
| 3.1 | Secondary | GHSA | 7.9 | — | — | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L |
| 3.1 | Secondary | NVD | 7.9 | 1.3 | 6.0 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:L |