Discovery
Bookstack before v21.11.3 allowed authenticated users to search for other users by email address using the user search endpoint. By exploiting SQL LIKE wildcards, an attacker could enumerate email addresses character by character.
Bookstack is a popular wiki platform built in Laravel for storing and organising information and documentation. Prior to Bookstack v21.11.3, it contained an improper access control vulnerability which allowed authenticated users to harvest email addresses belonging to any user on the platform.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The user search endpoint allowed any authenticated user to search by email using SQL LIKE wildcards, and returned usernames when a match was found, enabling character-by-character enumeration.
What the attacker needed
Authenticated user account
The fix
The vulnerability was fixed by restricting access to the endpoint to users with user management permissions and removing email-based search entirely.
How it was found
- Review the routes file to find the /search/users/select endpoint.
- Identify that the search parameter is used in a SQL LIKE clause for email and name.
- Determine the length of a target user's email by adding underscore wildcards until the user no longer appears.
- Enumerate each character of the email by replacing underscores with candidate characters and observing when the user appears.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Bookstack is a wiki platform. A search feature let logged-in users find other users by typing part of their email address. Because the search used special wildcard characters, an attacker could guess email addresses one character at a time, even though the page only showed usernames.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.