Query timing attack allows extraction of private bug data
Bugzilla's search function lacks a CSRF token, allowing an attacker to use an onload handler to time searches and infer whether a query returns one result versus none. By repeatedly timing crafted searches, an attacker could slowly extract a bug's summary or other fields.
Originally disclosed on Mozilla
- Fixed in 9.8 years
- Paid in 17 months
- Disclosed after 9.8 years
Created attachment 629678
proof of concept timing attack
Bugzilla's search function does not use a CSRF token. By using the onload() handler, an attacker can see how long a particular search takes. Searches that return one result consistently take longer than those that return no results. By repeatedly timing specially crafted searches an attacker may (slowly) extract the entirety of a bug's summary, or any other field. I've attached a proof of concept which will, with a bit of luck, map out the entire summary of any bugid given to it. It's currently keyed to #686451 but it ought to work with any bug you have permission to view. It's unpolished but I think it's reliable enough to make the point.
The proof of concept attack could be prevented just by adding X-Frame-Options but I think adding a CSRF token to searches would be a far safer patch.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the search endpoint lacks a CSRF token and returns different response times depending on whether a query matches a result, enabling a timing side channel.
Impact
An attacker could slowly extract the entirety of a bug's summary or any other field, but only for bugs the victim has permission to view.
What the attacker needed
Victim visits attacker-controlled page; victim has permission to view target bug
The fix
The report suggests adding X-Frame-Options to prevent the attack, but recommends adding a CSRF token to searches as a safer patch.
How it was found
- Craft a search query that returns one result if a guessed character is correct, and no results otherwise.
- Use an onload handler to load the search and measure how long it takes.
- Repeat the timing for each possible character to infer the correct one.
- Iterate over the entire summary or other fields to extract them.
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 report has not been written yet. The Original tab links to the source.
A website's search feature can be abused to leak secret information if the time it takes to respond depends on whether a guess is correct. Here, an attacker can make a victim's browser run searches in the background and measure how long they take, slowly revealing private bug details.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.