See how bookstackapp compares to other vendors in security performance
A weakness has been identified in BookStackApp BookStack up to 26.09.1. This impacts the function restrictEntityRelationQuery of the file app/Permissions/PermissionApplicator.php of the component Comments API. Executing a manipulation can lead to incorrect authorization. The attack may be launched remotely. The exploit has been made available to the public and could be used for attacks. Upgrading to version 26.09.2 will fix this issue. This patch is called 7ae9a4e08f4d9c7dba0e0fa4cce84b0e901f2e60. It is recommended to upgrade the affected component.
Server-Side Request Forgery (SSRF) in GitHub repository bookstackapp/bookstack prior to v23.08.
Cross-site Scripting (XSS) - Stored in GitHub repository bookstackapp/bookstack prior to v22.02.3.
A weakness has been identified in BookStackApp BookStack up to 26.03. Affected is the function chapterToMarkdown of the file app/Exports/ExportFormatter.php of the component Chapter Export Handler. Executing a manipulation of the argument pages can lead to improper access controls. It is possible to launch the attack remotely. The exploit has been made available to the public and could be used for attacks. Upgrading to version 26.03.1 is able to address this issue. This patch is called 8a59895ba063040cc8dafd82e94024c406df3d04. It is advisable to upgrade the affected component. The vendor was contacted early, responded in a very professional manner and quickly released a fixed version of the affected product.
Cross-site scripting vulnerability in BookStack versions prior to v22.09 allows a remote authenticated attacker to inject an arbitrary script.
bookstack is vulnerable to Improper Access Control
bookstack is vulnerable to Improper Access Control
bookstack is vulnerable to Improper Access Control
bookstack is vulnerable to Cross-Site Request Forgery (CSRF)
bookstack is vulnerable to Unrestricted Upload of File with Dangerous Type
bookstack is vulnerable to Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
bookstack is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
bookstack is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
bookstack is vulnerable to Server-Side Request Forgery (SSRF)
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 localsecure 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 BookStack Beta v0.25.4 BookStack Beta v0.25.5
For more information
If you have any questions or comments about this advisory: Open an issue in the BookStack GitHub repository. Ask on the BookStack Discord chat. Follow the BookStack Security advise to contact someone privately.
Bookstack Cross-site Scripting vulnerability
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 JVN#41035278 BookStack Blog Post
For more information
If you have any questions or comments about this advisory: Open an issue in the BookStack GitHub repository. Ask on the BookStack Discord chat. Follow the BookStack Security Advice to contact someone privately.
Book Stack version 23.10.2 allows filtering local files on the server. This is possible because the application is vulnerable to SSRF.
BookStack version 0.18.4 is vulnerable to stored cross-site scripting, within the page creation page, which can result in disruption of service and execution of javascript code.
BookStack is a platform for storing and organising information and documentation. In BookStack before version 0.30.5, a user with permissions to edit a page could set certain image URL's to manipulate functionality in the exporting system, which would allow them to make server side requests and/or have access to a wider scope of files within the BookStack file storage locations. The issue was addressed in BookStack v0.30.5. As a workaround, page edit permissions could be limited to only those that are trusted until you can upgrade.
In BookStack before version 0.30.4, a user with permissions to edit a page could add an attached link which would execute untrusted JavaScript code when clicked by a viewer of the page. Dangerous content may remain in the database after this update. If you think this could have been exploited the linked advisory provides a SQL query to test. As a workaround, page edit permissions could be limited to only those that are trusted until you can upgrade although this will not address existing exploitation of this vulnerability. The issue is fixed in version 0.30.4.
bookstack is vulnerable to Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
bookstack is vulnerable to Unrestricted Upload of File with Dangerous Type