CVE-2026-70369

Koha - SQL Injection in reports/acquisitions_stats.pl

Published Aug 4, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
Description
Koha's reports/acquisitions_stats.pl builds its per-cell statistics query in sub calculate by interpolating the user-controlled Filter request parameters directly into WHERE fragments covering aqbasket.closedate, aqorders.datereceived, aqbooksellers.name, items.homebranch, items.ccode, biblioitems.itemtype, aqbudgets.budget_code, aqorders.sort1, and aqorders.sort2.

Analysis

AI-generated

Technical impact

Koha’s acquisition statistics report constructs per‑cell SQL queries by inserting user‑controlled filter parameters directly into the WHERE clause for various columns. Because parameter binding is absent, the query can be manipulated. The CVE description does not detail authentication or authorization requirements, so the analysis does not assume particular user roles are needed. The flaw is a classic SQL injection (CWE‑89) that may allow an attacker to execute arbitrary SQL against the database, potentially exposing or altering data that the Koha database user is permitted to access.

Affected Systems

The vulnerability is present in the Koha Community edition. The 25.05.12 release, referenced in the advisory, contains the unparameterized acquisition statistics report code and is therefore vulnerable. Any Koha release that includes the same code without a fix remains susceptible. Users should verify whether later releases contain the patch and determine if their current deployment is affected.

Risk and Exploitability

Exploitation requires sending a crafted request to the vulnerable report endpoint with the injected filter parameters. The CVE description does not specify any authentication or permission prerequisites, so it is unknown whether any user context is necessary. The absence of bound parameters makes the injection straightforward once the endpoint is reached. The EPSS score is below 1% and the issue is not listed in KEV, while the CVSS score of 8.8 indicates a high severity. The potential impact of the flaw is that an attacker could retrieve or modify data accessible to the Koha database account, leading to a breach of confidentiality and integrity.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Koha to a version that includes the acquisition stats SQL injection fix, such as 25.05.13 or later.
  • Restrict the reports module permission to trusted operators, or disable the module for users who do not need it.
  • Audit the Koha database user’s privileges to ensure the minimum required permissions and monitor for abnormal query activity.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description Koha's reports/acquisitions_stats.pl builds its per-cell statistics query in sub calculate by interpolating the user-controlled Filter request parameters directly into WHERE fragments covering aqbasket.closedate, aqorders.datereceived, aqbooksellers.name, items.homebranch, items.ccode, biblioitems.itemtype, aqbudgets.budget_code, aqorders.sort1, and aqorders.sort2. The statement is prepared and executed with no bound parameters. 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), borrower_password_recovery, api_keys, and sessions. Koha's reports/acquisitions_stats.pl builds its per-cell statistics query in sub calculate by interpolating the user-controlled Filter request parameters directly into WHERE fragments covering aqbasket.closedate, aqorders.datereceived, aqbooksellers.name, items.homebranch, items.ccode, biblioitems.itemtype, aqbudgets.budget_code, aqorders.sort1, and aqorders.sort2.
Type Values Removed Values Added
Title Koha: SQL Injection in reports/acquisitions_stats.pl Koha - SQL Injection in reports/acquisitions_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/acquisitions_stats.pl builds its per-cell statistics query in sub calculate by interpolating the user-controlled Filter request parameters directly into WHERE fragments covering aqbasket.closedate, aqorders.datereceived, aqbooksellers.name, items.homebranch, items.ccode, biblioitems.itemtype, aqbudgets.budget_code, aqorders.sort1, and aqorders.sort2. The statement is prepared and executed with no bound parameters. 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), borrower_password_recovery, api_keys, and sessions.
Title Koha: SQL Injection in reports/acquisitions_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