Description
Koha's reports/catalogue_stats.pl builds dynamic SQL in sub calculate by interpolating the user-controlled Line and Column request parameters directly into identifier positions of the query (SELECT DISTINCTROW, GROUP BY, ORDER BY) with no whitelist validation.
Published: 2026-08-04
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Koha’s reports module contains a script that builds dynamic SQL by interpolating user‑supplied Line and Column request parameters directly into identifier positions such as SELECT DISTINCTROW, GROUP BY, and ORDER BY without any whitelist validation. This oversight allows an attacker to inject arbitrary SQL, enabling the execution of any query that the Koha database user is permitted to run. Consequently, a malicious actor could read or potentially modify sensitive information stored in the Koha database, including personal data, authentication credentials, and other confidential records. The vulnerability therefore represents a significant confidentiality breach.

Affected Systems

The flaw exists in the Koha Community Edition wherever the reports module and the reports/catalogue_stats.pl script are deployed. No specific product version is delineated in the advisory, but the fix is packaged in the 25.05.12 release; all earlier installations that have not applied this update remain susceptible.

Risk and Exploitability

The CVSS score of 8.8 classifies the issue as high severity, while an EPSS score of less than 1% indicates a low likelihood of exploitation at the time of analysis. The vulnerability is not currently listed in the CISA KEV catalog. The primary attack vector is likely via web requests to the vulnerable script, and the script is typically accessible only to users with staff‑level permissions within the reports module. Despite the limited access requirement, the potential for accessing sensitive database contents warrants immediate attention and remediation.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Deploy the latest Koha release (25.05.12 or later) that contains the SQL injection fix for reports/catalogue_stats.pl.
  • If an upgrade cannot be performed promptly, restrict the reports module permission to trusted staff or temporarily disable the module for all users.
  • Consider configuring the Koha database account with least‑privilege permissions, limiting its ability to query sensitive tables.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 12:00:00 +0000

Type Values Removed Values Added
Description Koha's reports/catalogue_stats.pl builds dynamic SQL in sub calculate by interpolating the user-controlled Line and Column request parameters directly into identifier positions of the query (SELECT DISTINCTROW, GROUP BY, ORDER BY) with no whitelist validation. When Line contains itemcallnumber and the cotedigits parameter is truthy, cotedigits is additionally concatenated raw as the numeric argument of a LEFT() call. 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/catalogue_stats.pl builds dynamic SQL in sub calculate by interpolating the user-controlled Line and Column request parameters directly into identifier positions of the query (SELECT DISTINCTROW, GROUP BY, ORDER BY) with no whitelist validation.

Mon, 10 Aug 2026 11:30:00 +0000

Type Values Removed Values Added
Title Koha: SQL Injection in reports/catalogue_stats.pl Koha - SQL Injection in reports/catalogue_stats.pl

Wed, 05 Aug 2026 13:15:00 +0000

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


Tue, 04 Aug 2026 18:30:00 +0000

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


Tue, 04 Aug 2026 15:45:00 +0000

Type Values Removed Values Added
First Time appeared Koha-community
Koha-community koha
Vendors & Products Koha-community
Koha-community koha

Tue, 04 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
Description Koha's reports/catalogue_stats.pl builds dynamic SQL in sub calculate by interpolating the user-controlled Line and Column request parameters directly into identifier positions of the query (SELECT DISTINCTROW, GROUP BY, ORDER BY) with no whitelist validation. When Line contains itemcallnumber and the cotedigits parameter is truthy, cotedigits is additionally concatenated raw as the numeric argument of a LEFT() call. 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/catalogue_stats.pl
Weaknesses CWE-89
References

Subscriptions

Koha-community Koha
cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-10T11:44:40.413Z

Reserved: 2026-08-04T07:13:07.992Z

Link: CVE-2026-70370

cve-icon Vulnrichment

Updated: 2026-08-04T17:21:03.435Z

cve-icon NVD

Status : Received

Published: 2026-08-04T13:18:57.803

Modified: 2026-08-10T12:17:22.457

Link: CVE-2026-70370

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T23:15:05Z

Weaknesses
  • CWE-89

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