CVE-2026-6428

HIGH

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

Title source: rule
STIX 2.1

Description

SQL Injection in reports/catalogue_out.pl in Koha Community Koha through 22.11.37, 23.x, 24.x before 24.11.16, 25.05.x before 25.05.11, 25.11.x before 25.11.05, 26.05.x before 26.05.01, and 26.11.x before 26.11.00 allows an authenticated staff user with the Reports module flag to read arbitrary data from the Koha application database via the Filter URL parameter when the Criteria parameter matches /branchcode/. The vulnerable sink in sub calculate concatenates the unmodified Filter request parameter directly into a LIKE clause of the auxiliary $strsth2 statement and executes it via DBI without bound parameters: my $f = @$filters[0]; $f =~ s/\*/%/g; $strsth2 .= " AND $column LIKE '$f' "; This enables error-based SQL injection (e.g., via EXTRACTVALUE) and full read access to sensitive tables including borrowers (password hashes, 2FA secrets, PII), borrower_password_recovery, api_keys, and sessions. Proof of concept (error-based, single request): GET /cgi-bin/koha/reports/catalogue_out.pl?do_it=1&output=screen&Limit=10&Criteria=branchcode&Filter=x'+AND+EXTRACTVALUE(1,CONCAT(0x7e,VERSION(),0x7c,USER(),0x7c,DATABASE(),0x7e))--+- Cookie: CGISESSID=<LIBRARIAN_SESSION> The response body contains the DBI exception leaking the MariaDB version, database user, client IP, and database name, after which arbitrary data can be paged out using LIMIT n,1 / SUBSTRING(...). The vulnerable sink was introduced in commit 6bb77ae3e4 (2008-07-09); CVE-2015-4633 patched the same class in sibling files but did not generalise the fix to reports/catalogue_out.pl. Fixed in Koha 22.11.38, 24.11.16, 25.05.11, 25.11.05, 26.05.01, and 26.11.00 by replacing the raw concatenation with a parameterised placeholder.

References (3)

Core 3
Core References
Vendor Advisory issue-tracking vendor-advisory
Koha Bug 42361 - SQL Injection in reports/catalogue_out.pl via Filter parameter
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42361
Vendor Advisory patch vendor-advisory
Bug 42361: Fix SQL injection in catalogue_out.pl (official patch)
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199539
Vendor Advisory vendor-advisory
Koha Community Security Releases
https://koha-community.org/security-releases/

Scores

CVSS v3 7.6
EPSS 0.0024
EPSS Percentile 15.3%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact partial

Details

CWE
CWE-89
Status published
Products (6)
Koha Community/Koha < 22.11.38
Koha Community/Koha 23.05.00 - 23.11.15
Koha Community/Koha 24.05.00 - 24.11.16
Koha Community/Koha 25.05.00 - 25.05.11
Koha Community/Koha 25.11.00 - 25.11.05
Koha Community/Koha 26.05.00 - 26.05.01
Published Jun 13, 2026
Tracked Since Jun 13, 2026