CVE-2026-70372

Koha - SQL Injection in reports/bor_issues_top.pl

Published Aug 4, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
Description
Koha's reports/bor_issues_top.pl builds dynamic SQL in sub calculate by concatenating several user-controlled request parameters directly into the query string. An authenticated staff user holding the reports module permission can inject arbitrary SQL and read any table reachable by the Koha database user, including borrowers (password hashes, two-factor secrets, personal data), api_keys, and sessions.

Analysis

AI-generated

Technical impact

Koha’s reports module script reports/bor_issues_top.pl builds SQL queries by directly concatenating user-controlled request parameters into the query string. An authenticated staff user who has permission to run reports can therefore inject arbitrary SQL. This flaw enables the attacker to read any table that the Koha database user can access, including borrower records (containing password hashes, two-factor secrets and personal data), api_keys, and session tables, leading to the exfiltration of sensitive application data and compromising data confidentiality.

Affected Systems

The vulnerability affects Koha Community installations where the reports module is enabled and a staff account holds the reports permission. The flaw resides in the script that constructs SQL queries by directly concatenating user-supplied request parameters.

Risk and Exploitability

Exploitation requires only an authenticated staff user with the reports permission; no additional privileges are necessary. The CVSS score of 8.8 indicates high severity. The EPSS score is below 1%, suggesting a low probability of exploitation but still possible. The vulnerability is not listed in the CISA KEV catalog. The primary risk is high-level information disclosure; the likelihood depends on the exposure of the Koha installation and the distribution of the reports permission.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest Koha release that contains the fix for the SQL injection in reports/bor_issues_top.pl.
  • If a patch is not yet available, modify the script to use parameterized queries or otherwise sanitize all user-controlled inputs.
  • Restrict the reports module permission to only trusted staff accounts and revoke it for users that do not require reporting capabilities.

Generated by OpenCVE AI on August 10, 2026 at 23:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description Koha's reports/bor_issues_top.pl builds dynamic SQL in sub calculate by concatenating several user-controlled request parameters directly into the query string. The Criteria parameter is only normalized by a table-name prefix and is never whitelisted, landing verbatim in identifier positions (SELECT DISTINCTROW, GROUP BY, ORDER BY); Filter values are concatenated raw into single-quoted LIKE, BETWEEN, and comparison fragments, and the Limit parameter is appended raw to a LIMIT clause. An authenticated staff user holding the reports module permission can inject arbitrary SQL and read any table reachable by the Koha database user, including borrowers (password hashes, two-factor secrets, personal data), api_keys, and sessions. Koha's reports/bor_issues_top.pl builds dynamic SQL in sub calculate by concatenating several user-controlled request parameters directly into the query string. An authenticated staff user holding the reports module permission can inject arbitrary SQL and read any table reachable by the Koha database user, including borrowers (password hashes, two-factor secrets, personal data), api_keys, and sessions.
Type Values Removed Values Added
Title Koha: SQL Injection in reports/bor_issues_top.pl Koha - SQL Injection in reports/bor_issues_top.pl
Type Values Removed Values Added
Metrics cvssV3_1

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

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'}

Type Values Removed Values Added
Metrics cvssV3_1

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

ssvc

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

Type Values Removed Values Added
First Time appeared Koha-community
Koha-community koha
Vendors & Products Koha-community
Koha-community koha
Type Values Removed Values Added
Description Koha's reports/bor_issues_top.pl builds dynamic SQL in sub calculate by concatenating several user-controlled request parameters directly into the query string. The Criteria parameter is only normalized by a table-name prefix and is never whitelisted, landing verbatim in identifier positions (SELECT DISTINCTROW, GROUP BY, ORDER BY); Filter values are concatenated raw into single-quoted LIKE, BETWEEN, and comparison fragments, and the Limit parameter is appended raw to a LIMIT clause. An authenticated staff user holding the reports module permission can inject arbitrary SQL and read any table reachable by the Koha database user, including borrowers (password hashes, two-factor secrets, personal data), api_keys, and sessions.
Title Koha: SQL Injection in reports/bor_issues_top.pl
Weaknesses CWE-89
References
Weaknesses
  • CWE-89

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

Sources

Status
PUBLISHED
Assigner
TuranSec
Published
Updated
Aug 10, 2026, 11:44 AM
Reserved
Aug 4, 2026, 7:13 AM
Status
Deferred
Published
Aug 4, 2026, 1:18 PM
Modified
Oct 23, 2026, 11:10 PM