Skip to content
Info disclosure Write-up Intermediate

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.

haxatron1 Follow

Published on haxatron.gitbook.io

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.

Haxatron (@Haxatron1), on haxatron.gitbook.io

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

  1. Review the routes file to find the /search/users/select endpoint.
  2. Identify that the search parameter is used in a SQL LIKE clause for email and name.
  3. Determine the length of a target user's email by adding underscore wildcards until the user no longer appears.
  4. 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.

More by haxatron1

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.