CVE-2026-71288
Received Received - Intake

SQL Injection in Koha Guided Report Builder

Vulnerability report for CVE-2026-71288, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-05

Last updated on: 2026-08-05

Assigner: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c

Description

Koha's guided report builder (reports/guided_reports.pl) reads the `order_by` CGI parameter and, for each value, a dynamically-named `{order}_ovalue` parameter, and concatenates both directly into an SQL ORDER BY clause with no allowlist or validation: `my @order_by = $input->multi_param('order_by'); foreach my $order (@order_by) { my $value = $input->param($order . "_ovalue"); $query_orderby = " ORDER BY $order $value"; }`. The resulting string is appended verbatim to the final query in C4::Reports::Guided (`$query .= $orderby;`) with no escaping. Since ORDER BY columns cannot be bound via prepared-statement placeholders, this requires an explicit allowlist, which does not exist. Any staff account with the low-privilege create_reports or execute_reports permission (commonly granted to non-admin library staff) can perform time-based blind SQL injection against the Koha database, which stores patron PII and staff/LDAP credentials.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-05
Last Modified
2026-08-05
Generated
2026-08-05
AI Q&A
2026-08-05
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
koha koha *
koha_community koha *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-89 The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a SQL injection vulnerability in Koha's guided report builder. The system reads the order_by CGI parameter and dynamically constructs an SQL ORDER BY clause without validation or allowlisting. This allows staff users with basic report permissions to inject malicious SQL code into queries, enabling time-based blind SQL injection attacks against the Koha database which stores sensitive patron and staff information.

Detection Guidance

To detect this SQL injection vulnerability in Koha's guided report builder, inspect the guided_reports.pl script for improper handling of the order_by and related CGI parameters. Check if user-supplied values are directly concatenated into SQL ORDER BY clauses without validation or allowlisting. Monitor database query logs for unusual or time-delayed queries originating from staff accounts with report permissions.

Impact Analysis

An attacker with staff access could extract sensitive data like patron PII, staff credentials, or LDAP authentication details. They could also modify or delete database records, potentially disrupting library operations. The vulnerability requires only low-privilege report permissions, which are commonly granted to non-admin library staff.

Compliance Impact

This vulnerability could lead to unauthorized access and exposure of protected health information or personally identifiable information, violating GDPR and HIPAA requirements for data protection and access controls. Organizations using Koha may face compliance violations and potential regulatory penalties if this vulnerability is exploited.

Mitigation Strategies

Apply the latest security patch from Koha immediately to fix the SQL injection flaw in the guided report builder. Temporarily restrict staff accounts with create_reports or execute_reports permissions until patched. Monitor database queries for unusual ORDER BY clauses or time delays.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-71288. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart