Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Network-reachable web application requires only low-privilege staff authentication; full C/I/A reflects unrestricted database read/write via SQL injection with no scope change.
Primary rating from Vendor (TuranSec).
CVSS VectorVendor: TuranSec
Lifecycle Timeline
2DescriptionCVE.org
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.
AnalysisAI
SQL injection in Koha's guided report builder (reports/guided_reports.pl) allows any authenticated staff member holding the low-privilege create_reports or execute_reports permission to perform time-based blind SQL injection against the Koha database, which stores patron PII, borrowing history, and staff/LDAP credentials. The order_by and dynamically-named {order}_ovalue CGI parameters are concatenated verbatim into an ORDER BY clause by C4::Reports::Guided with no allowlist, escaping, or prepared-statement binding - a structural defect, since SQL placeholders cannot parameterize column names. No public exploit or CISA KEV listing has been identified at time of analysis, but the attack technique is well-understood and the affected permission is routinely granted to non-admin library staff.
Technical ContextAI
Koha is the world's most widely deployed open-source integrated library system (ILS), used by thousands of public, academic, and special libraries. The vulnerability is rooted in CWE-89 (SQL Injection) and exists because reports/guided_reports.pl calls $input->multi_param('order_by') and $input->param($order . '_ovalue') and concatenates both directly into the ORDER BY string, which C4::Reports::Guided then appends verbatim to the final query ($query .= $orderby). SQL prepared-statement placeholders cannot bind column names or sort directions, so the only safe approach is an explicit server-side allowlist of permitted column identifiers - one that does not exist in this code path. The affected CPE is cpe:2.3:a:koha_community:koha:*:*:*:*:*:*:*:*, indicating all community releases are affected. The Koha database is a MySQL/MariaDB instance and supports time-based blind injection techniques (e.g., SLEEP(), BENCHMARK()), making credential and PII extraction feasible without triggering visible error messages.
RemediationAI
No vendor-released patch has been identified at time of analysis; monitor the Koha Community GitHub repository at https://github.com/Koha-Community/Koha for commits addressing the ORDER BY injection in reports/guided_reports.pl. The primary compensating control is to immediately audit and revoke the create_reports and execute_reports permissions from any staff account that does not have a strict operational need - this directly eliminates the attack surface for non-admin users, though it may disrupt legitimate reporting workflows. As a secondary control, place the Koha web interface behind a WAF with a ruleset targeting ORDER BY injection patterns (e.g., ModSecurity CRS rules for SQL injection); note that WAF bypass is feasible for skilled attackers and this is not a substitute for a code fix. Network-level restriction of the Koha staff interface to trusted internal IP ranges reduces exposure to external attackers but does not address insider threat. The correct permanent fix requires implementing an explicit server-side allowlist of permitted column names in reports/guided_reports.pl before any user-supplied order_by or _ovalue value is interpolated into the query string.
Cross Site Scripting vulnerability in Koha ILS 23.05 and before allows a remote attacker to execute arbitrary code via t
KOHA Library System version 16.11.x (up until 16.11.13) and 17.05.x (up until 17.05.05) contains a Cross Site Request Fo
CSV Injection vulnerability in '/members/moremember.pl' and '/admin/aqbudgets.pl' endpoints in Koha Library Management S
An issue in Koha ILS 23.05 and before allows a remote attacker to execute arbitrary code via a crafted script to the for
KOHA Library System version 16.11.x (up until 16.11.13) and 17.05.x (up until 17.05.05) contains a Cross Site Scripting
Koha versions 25.11 and earlier contain a stored cross-site scripting vulnerability in the News function that allows aut
A vulnerability was found in KOHA up to 23.05.03. Rated medium severity (CVSS 5.4), this vulnerability is remotely explo
Cross-site scripting (XSS) vulnerability in opac-addbybiblionumber.pl in Koha 3.14.x before 3.14.16, 3.16.x before 3.16.
Authenticated remote code execution in Koha lets anyone who can reach the affected web service on TCP port 8081 feed a c
SQL injection in the Koha library management system's staff interface allows authenticated users to manipulate the displ
Multiple cross-site scripting (XSS) vulnerabilities in the Staff client in Koha before 3.16.6 and 3.18.x before 3.18.2 a
Stored SQL injection in Koha library management software allows authenticated staff holding the items_batchmod permissio
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-53373
GHSA-q274-qf66-4hq6