CVE-2026-6428: SQL Injection Vulnerability in Koha
High CVSS (7.6) vulnerability; prioritize internet-facing assets.
TL;DR - Authenticated Koha staff with Reports privileges can exploit SQL injection in
reports/catalogue_out.pl. - Affected deployments should upgrade immediately to a fixed release in their supported branch. - No confirmed in-the-wild exploitation was found, but a public PoC exists in the NVD entry.
| Field | Value |
|---|---|
| CVE ID | CVE-2026-6428 |
| CVSS score | 7.6 High |
| Attack vector | Unknown from retrieved NVD vector data at lookup time |
| Auth required | Yes, authenticated staff user with Reports module flag |
| Patch status | Yes, fixes available in multiple supported branches |
Vulnerability at a glance
CVE-2026-6428 is an SQL injection flaw in Koha’s reports/catalogue_out.pl. According to the NVD description, the vulnerable path is reachable when the Criteria parameter matches /branchcode/, and attacker-controlled input from the Filter URL parameter is concatenated directly into a SQL LIKE clause without bound parameters. That means an authenticated user in the right role can turn a normal report request into a database extraction channel.
For defenders, the important nuance is that this is not an anonymous internet scan issue. The attacker needs a valid staff session and the Reports module flag. That reduces broad internet exposure, but it does not make the issue low risk. In many Koha environments, reporting access is granted to multiple operational users, and those accounts may also be valuable post-compromise targets. A stolen librarian session or a compromised staff workstation could be enough to exploit this bug.
What the vulnerability does
The NVD record states that exploitation allows an authenticated staff user to read arbitrary data from the Koha application database. The documented impact is confidentiality-focused rather than destructive, but the data at risk is highly sensitive. NVD specifically mentions exposure of data from tables such as borrowers, borrower_password_recovery, api_keys, and sessions.
That matters because even “read-only” SQL injection can lead to follow-on compromise. If an attacker can retrieve password hashes, 2FA secrets, password recovery data, API keys, or session records, they may be able to escalate access, hijack active sessions, crack credentials offline, or pivot into adjacent systems. In library environments holding patron information, the privacy and compliance consequences can be significant even without direct database modification.
Affected versions and fixed releases
The affected version ranges, based on the NVD record and Koha bug tracker metadata, are as follows:
| Branch | Affected versions | Fixed version |
|---|---|---|
| 22.11 | through 22.11.37 | 22.11.38 |
| 23.x | 23.x | Unknown from retrieved branch metadata |
| 24.x | before 24.11.16 | 24.11.16 |
| 25.05.x | before 25.05.11 | 25.05.11 |
| 25.11.x | before 25.11.05 | 25.11.05 |
| 26.05.x | before 26.05.01 | 26.05.01 |
| 26.11.x | before 26.11.00 | 26.11.00 |
Two practical details deserve attention. First, the vulnerable scope includes "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". Second, although 23.x is explicitly listed as affected, the retrieved bug metadata did not show a corresponding fixed 23.x release. In the absence of a visible fixed 23.x branch from the supplied sources, defenders should assume 23.x is vulnerable and plan migration to a supported fixed branch rather than waiting for a backport that may never arrive.
Exploitation status
At the time of lookup, there was no evidence in the provided primary sources confirming exploitation in the wild. The CVE was not listed in CISA’s Known Exploited Vulnerabilities catalog, and no KEV dateAdded or required federal remediation date applies based on the retrieved data. That does not prove safety; it only means no authoritative public confirmation was available from the sources used here.
A proof of concept does exist in public documentation. The NVD entry itself includes a concrete HTTP request demonstrating error-based SQL injection using EXTRACTVALUE. Because the PoC is embedded in a high-visibility public advisory, defenders should assume that reproducing exploitation is straightforward for anyone with access to a valid Koha staff session and appropriate permissions.
Technical Notes
The NVD-provided example request is:
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>
This payload is useful to defenders because it also highlights likely detection artifacts: the request targets catalogue_out.pl, uses Criteria=branchcode, and contains SQL metacharacters and functions inside Filter.
Root cause and technical details
The root cause is classic unsafe SQL construction. Per the NVD description, Koha took the first filter value, replaced * with %, and then concatenated the result directly into a SQL LIKE clause. The vulnerable code path is described as:
my $f = @$filters[0];
$f =~ s/\*/%/g;
$strsth2 .= " AND $column LIKE '$f' ";
That pattern is dangerous because user input reaches a SQL execution sink without parameter binding. The presence of a LIKE clause does not make the query safe; if quotes and SQL operators are accepted, the attacker can break out of the string and inject additional expressions. NVD notes error-based extraction via EXTRACTVALUE, which is consistent with exploiting a string-concatenated SQL expression against a backend that returns useful database errors.
The Koha patch also shows the remediation went beyond simple parameterization. The fix reportedly validates Limit as numeric, constrains Criteria to expected values such as homebranch or itype, validates Filter against known library or item-type records, and switches query execution to a bound parameter model. That layered change is important because it reduces both the immediate SQL injection sink and the broader attack surface around untrusted reporting input.
Technical Notes
The fixed pattern replaces string interpolation with bind parameters:
$strsth2 .= " AND $column LIKE ? ";
push( @bind, $f );
$sth2->execute(@bind);
The patch reportedly also introduces validation using Koha objects such as:
use Koha::Libraries;
use Koha::ItemTypes;
For secure code review, that combination tells you what to look for elsewhere in Koha customizations: request parameters reaching SQL fragments, report helpers building dynamic conditions, and any DBI execute path that is not using placeholders and bind arrays.
What defenders should do next
Start by inventorying every Koha instance and mapping each one to the quoted affected ranges. Confirm whether any system is "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", or "26.11.x before 26.11.00". Then identify users with Reports access and review whether that permission is broader than operationally necessary.
Next, hunt for evidence of abuse using the detection patterns above, especially requests that include Criteria=branchcode and suspicious Filter payloads. Because a public PoC exists but confirmed in-the-wild exploitation was not established in the provided sources, the right operational stance is “assume exploitability, verify exposure, and patch urgently.” This is especially true if your Koha environment contains patron PII, staff credentials, API integrations, or session records that would materially increase downstream impact.
For further reading on related vulnerabilities, check out our articles on CVE-2026-45631 and 2026-04-19 Digest on Browser Zero-Day Exploitation.
This article may contain affiliate links. We earn a commission on qualifying purchases at no extra cost to you. ```
Detection and investigation
Detection should focus on web access logs, reverse proxy logs, WAF telemetry, and application error trails around report generation. Since exploitation requires an authenticated staff session, the most valuable triage path is correlation: look for a legitimate staff account making unusual requests to catalogue_out.pl, especially outside normal working hours or from abnormal source IPs, followed by spikes in report activity or suspicious database error messages.
You should also review which accounts hold the Reports module flag. If many users have report rights, your exposure is broader than the CVSS alone suggests. Because the described impact is arbitrary data read, watch for repeated requests with different Filter values, evidence of SQL function abuse, or output patterns that suggest enumeration of database metadata, users, sessions, or secrets.
Technical Notes
A concrete web log pattern to search for is any request to catalogue_out.pl where Criteria=branchcode and Filter contains SQL metacharacters or database functions:
/cgi-bin/koha/reports/catalogue_out\.pl.*Criteria=branchcode.*Filter=.*('|\bEXTRACTVALUE\b|\bCONCAT\b|--|\bUNION\b|\bSLEEP\b)
Example grep against access logs:
grep -E "/cgi-bin/koha/reports/catalogue_out\.pl.*Criteria=branchcode.*Filter=.*('|\bEXTRACTVALUE\b|\bCONCAT\b|--|\bUNION\b|\bSLEEP\b)" /var/log/apache2/access.log
Example Splunk query:
index=web sourcetype=apache_access (
uri_path="/cgi-bin/koha/reports/catalogue_out.pl"
AND uri_query="*Criteria=branchcode*"
AND (
uri_query="*Filter=*EXTRACTVALUE*"
OR uri_query="*Filter=*CONCAT*"
OR uri_query="*Filter=*--*"
OR uri_query="*Filter=*'*"
OR uri_query="*Filter=*UNION*"
OR uri_query="*Filter=*SLEEP*"
)
)
| stats count values(src_ip) values(user_agent) values(uri_query) by cookie
If you have database error logging enabled, search for XML function errors or malformed LIKE conditions generated from reporting requests. The exact database log strings are environment-dependent and were not provided in the source material, so defenders should assume web-layer telemetry may be the most reliable source if DB logs are limited.
Mitigation and patching
The best mitigation is to upgrade to a fixed version in your current supported branch. Based on the provided sources, the fixed versions are 22.11.38, 24.11.16, 25.05.11, 25.11.05, 26.05.01, and 26.11.00. If you are on 23.x, the supplied materials list that branch as affected but do not identify a fixed 23.x release. In that case, the safe assumption is that you should move off 23.x to a supported fixed branch as soon as your change process allows.
If immediate patching is not possible, reduce exposure by limiting who has the Reports module flag, reviewing active staff sessions, and restricting access to the staff interface from trusted IP ranges or VPN-only paths. This is not a full fix, but it lowers the chance that a compromised credential or overprivileged account can be used to exploit the vulnerable report path.
Technical Notes
If Koha on your platform is installed from distribution packages, first identify the installed version:
koha-version
Then use your normal package manager workflow to retrieve the fixed release made available by your Koha repository. Exact package names vary by distribution and deployment model, but on Debian or Ubuntu-based systems this commonly means:
sudo apt update
sudo apt list --upgradable | grep -i koha
sudo apt upgrade
If you need a compensating control while planning an upgrade, block or tightly restrict access to the vulnerable endpoint at the web server or reverse proxy. Example Apache-style deny rule concept for the path:
<Location "/cgi-bin/koha/reports/catalogue_out.pl">
Require ip 10.0.0.0/8 192.168.0.0/16
</Location>
You can also reduce the blast radius by removing Reports privileges from nonessential staff accounts. Because the source material does not provide a vendor-supported temporary configuration switch for disabling only this vulnerable feature, defenders should assume there is no official one-line workaround and prioritize patching.