Description
Koha's guided report builder (reports/guided_reports.pl) reads the CGI parameter and, for each value, a dynamically-named parameter, and concatenates both directly into an SQL ORDER BY clause with no allowlist or validation. Since ORDER BY columns cannot be bound via prepared-statement placeholders, this requires an explicit allowlist, which does not exist.
Published: 2026-08-05
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Koha’s guided report builder reads CGI parameters and concatenates them directly into an ORDER BY clause without any validation or allowlist. Because ORDER BY columns cannot be parameterized, the script must build the clause as a string, and the absence of sanitization allows an attacker to inject arbitrary SQL. This flaw can be used to execute read or even destructive SQL commands, potentially exposing patron information, staff credentials, or other sensitive database contents.

Affected Systems

All installations of Koha Community’s Koha database management system that include the guided_reports.pl script are potentially affected, as the advisory does not specify a version range. Any version that ships with this script could be vulnerable.

Risk and Exploitability

The CVSS score of 8.8 flags the flaw as high severity, and the EPSS score of less than 1 percent indicates a very low likelihood of exploitation at this time. The vulnerability is not listed in the CISA KEV catalog. An attacker would need the ability to submit crafted requests to guided_reports.pl – for example, via the web interface – but the advisory does not specify user privilege requirements, leaving the attack reach uncertain. Nonetheless, if exploitation occurs it could allow unauthorized database access with potentially high impact.

Generated by OpenCVE AI on August 10, 2026 at 21:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest Koha update that fixes the SQL injection flaw.
  • Restrict or remove access to the guided_reports.pl functionality for users who do not require report generation capabilities.
  • If no patch is available, modify guided_reports.pl to enforce an explicit allowlist of permitted order_by and order_ovalue values, and escape or validate these parameters before including them in the ORDER BY clause.

Generated by OpenCVE AI on August 10, 2026 at 21:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 12:00:00 +0000

Type Values Removed Values Added
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. Koha's guided report builder (reports/guided_reports.pl) reads the CGI parameter and, for each value, a dynamically-named parameter, and concatenates both directly into an SQL ORDER BY clause with no allowlist or validation. Since ORDER BY columns cannot be bound via prepared-statement placeholders, this requires an explicit allowlist, which does not exist.
Title Koha - SQL Injection via order_by and {order}_ovalue Parameters in guided_reports.pl Koha SQL Injection via order_by and {order}_ovalue Parameters in guided_reports.pl

Mon, 10 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Title Koha SQL Injection via order_by and {order}_ovalue Parameters in guided_reports.pl Koha - SQL Injection via order_by and {order}_ovalue Parameters in guided_reports.pl

Wed, 05 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 05 Aug 2026 15:45:00 +0000

Type Values Removed Values Added
First Time appeared Koha-community
Koha-community koha
Vendors & Products Koha-community
Koha-community koha

Wed, 05 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
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.
Title Koha SQL Injection via order_by and {order}_ovalue Parameters in guided_reports.pl
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Koha-community Koha
cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-10T11:47:19.921Z

Reserved: 2026-08-05T12:23:34.968Z

Link: CVE-2026-71288

cve-icon Vulnrichment

Updated: 2026-08-05T15:49:55.357Z

cve-icon NVD

Status : Deferred

Published: 2026-08-05T13:24:53.583

Modified: 2026-08-26T17:13:24.800

Link: CVE-2026-71288

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T21:30:04Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')