Skip to content
SQL injection Write-up Intermediate

Reading the patch instead of the code: SQL Injection in GLPI (CVE

A SQL injection in GLPI's history filter function allowed an attacker with a read-only account to execute arbitrary SQL and extract sensitive data such as password hashes and API tokens. The vulnerability existed because the filter key was not validated before being passed to a query builder that treated certain keys as raw SQL.

Paulo Werneck Follow

Published on 5kr1pt.medium.com

On March 3, 2026, GLPI shipped a fix for a SQL injection in the history filters, CVE-2026–29047. Five lines added across two files, advisory published, new release out.

Paulo Werneck (5kr1pt), on 5kr1pt.medium.com

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

Likely the filter key was not validated against an allow list, and the query builder's legacy string passthrough returned user-controlled strings as raw SQL.

Impact

An attacker with a read-only account could extract password hashes, API tokens, and stored credentials such as SMTP and LDAP passwords from the database.

What the attacker needed

A read-only account; access to the history export endpoint

The fix

The fix adds an allow list for the filter key, rejecting any key not used by the interface.

How it was found

  1. Send a request to the history export endpoint with a filter parameter.
  2. Set the filter key to OR and the value to a time-delay SQL expression.
  3. Observe the delayed response confirming injection.
  4. Use comma-free and quote-free SQL syntax to build a boolean oracle.
  5. Extract data character by character using binary search and time delays.

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.

This is a SQL injection, which means an attacker can sneak database commands into a place the program expects normal data. Here, a filter in the history tab was not checked properly, so someone with a low-privilege account could make the database reveal stored passwords and tokens.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.