CVE-2026-70373

Koha - SQL Injection in reports/issues_stats.pl

Published Aug 4, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
Description
Koha's reports/issues_stats.pl (the circulation statistics report) builds its calculation query in sub calculate by concatenating several user-controlled request parameters directly into the SQL string. The PeriodTypeSel, PeriodDaySel, and PeriodMonthSel parameters are interpolated raw into single-quoted equality and function-comparison fragments, and the Filter slots plus the Line and Column identifiers are likewise interpolated with no whitelist and no placeholder binding.

Analysis

AI-generated

Technical impact

The reports module in Koha cleanses no user-supplied parameters used in constructing a SQL query. It concatenates the values of PeriodTypeSel, PeriodDaySel, PeriodMonthSel, filter slots, and SQL column identifiers directly into the statement string. This behaviour constitutes a classic SQL injection flaw (CWE-89) that permits an attacker to inject or substitute SQL code and potentially read, modify, or delete database contents.

Affected Systems

Koha Community Edition is affected. All releases before 25.05.12 contain the vulnerable logic, as indicated by the vendor references. Any installation that exposes the reports module to users can be impacted.

Risk and Exploitability

The CVSS score of 8.8 classifies the vulnerability as high severity, while the EPSS score of less than 1% suggests a low but non-zero probability of exploitation at the time of analysis. No public exploits have been documented, and the issue is not listed in CISA’s KEV catalog. The exploitation path involves supplying crafted parameters to the reports module; although the description does not explicitly state authentication requirements, the module generally requires staff-level access to generate circulation statistics. If an attacker gains access or injects malicious input, they can execute arbitrary SQL within the scope of the Koha database user.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Koha Community Edition 25.05.12 or later, which replaces the vulnerable query construction logic.
  • Restrict the reports permission to trusted staff accounts, and remove it from roles that do not require circulation statistics generation.
  • Enable database query logging and review for unexpected SELECT statements that may indicate injection attempts.
  • Consider deploying a web‑application firewall rule set that blocks anomalous SQL patterns in requests to the reports module.

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/issues_stats.pl (the circulation statistics report) builds its calculation query in sub calculate by concatenating several user-controlled request parameters directly into the SQL string. The PeriodTypeSel, PeriodDaySel, and PeriodMonthSel parameters are interpolated raw into single-quoted equality and function-comparison fragments, and the Filter slots plus the Line and Column identifiers are likewise interpolated with no whitelist and no placeholder binding. 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/issues_stats.pl (the circulation statistics report) builds its calculation query in sub calculate by concatenating several user-controlled request parameters directly into the SQL string. The PeriodTypeSel, PeriodDaySel, and PeriodMonthSel parameters are interpolated raw into single-quoted equality and function-comparison fragments, and the Filter slots plus the Line and Column identifiers are likewise interpolated with no whitelist and no placeholder binding.
Type Values Removed Values Added
Title Koha: SQL Injection in reports/issues_stats.pl Koha - SQL Injection in reports/issues_stats.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/issues_stats.pl (the circulation statistics report) builds its calculation query in sub calculate by concatenating several user-controlled request parameters directly into the SQL string. The PeriodTypeSel, PeriodDaySel, and PeriodMonthSel parameters are interpolated raw into single-quoted equality and function-comparison fragments, and the Filter slots plus the Line and Column identifiers are likewise interpolated with no whitelist and no placeholder binding. 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/issues_stats.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