Skip to main content

Koha ILS CVE-2026-70371

| EUVDEUVD-2026-52673 HIGH
SQL Injection (CWE-89)
2026-08-04 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c GHSA-24c7-g2cg-jw93
8.8
CVSS 3.1 · Vendor: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain staff credentials with reports permission
  2. Delivery
    Authenticate to Koha staff web interface
  3. Exploit
    Craft HTTP request with SQL payload in Line or Column parameter
  4. Execution
    Inject UNION SELECT into dynamically built query
  5. Persist
    Execute arbitrary SQL as Koha database user
  6. Impact
    Exfiltrate borrowers, api_keys, and sessions tables

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a valid Koha staff user account with the reports module permission explicitly granted - neither unauthenticated users nor authenticated staff lacking that specific permission can reach the vulnerable reports/issues_avg_stats.pl endpoint. The vulnerable code path is triggered by supplying attacker-controlled values in the Line, Column, or Filter HTTP request parameters to the calculate subroutine. No non-default Koha configuration is required; the reports module is a standard feature in typical library deployments. Exploitation is limited by the need for a pre-existing staff credential with the reports permission, which confines the realistic threat to insider actors or attackers who have already achieved initial access via credential compromise. The CVSS 'Automatable: no' (SSVC) rating reflects this authentication barrier preventing automated mass exploitation.

Impact

The CVSS 8.8 score with AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H accurately reflects that the endpoint is network-accessible, requires no special attack complexity, and needs only a low-privilege staff credential. However, the SSVC framework rates exploitation as 'none' and technical impact as 'partial' - the partial rating conflicts materially with CVSS C:H/I:H/A:H; this discrepancy should be verified with the Koha security team, as the CVE description clearly describes access to password hashes and session tokens, which represents high confidentiality impact. The SSVC 'Automatable: no' rating is consistent with the authentication prerequisite: mass exploitation is not feasible without valid staff credentials, lowering the risk of opportunistic scanning. The vulnerability is not listed in CISA KEV and no POC is publicly known, further reducing immediate urgency. The realistic threat model is an insider or an attacker who has already compromised a staff account; in that context, this vulnerability dramatically escalates privilege by granting full database read access including credential material for all patrons and staff.

Exploit ScenarioDerived

A Koha staff member whose account holds the reports module permission - or an attacker who has phished or brute-forced such credentials - sends a crafted HTTP POST to reports/issues_avg_stats.pl with a SQL payload injected into the Line parameter, appending a UNION SELECT to the generated ORDER BY clause to pivot into an arbitrary table read. The attacker retrieves all rows from the borrowers table, obtaining patron password hashes and two-factor authentication secrets for offline cracking or replay, then queries sessions to hijack currently authenticated administrator sessions. No public exploit code is known at the time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Aug 05, 2026

SQL injection in Koha's reports module allows an authenticated staff user with the reports permission to execute arbitrary SQL against the Koha database via reports/issues_avg_stats.pl. The Line and Column HTTP parameters are inserted verbatim into SQL identifier positions (SELECT DISTINCTROW, GROUP BY, ORDER BY) and Filter slots are concatenated raw into comparison predicates without parameterized queries, exposing the full Koha database to read and potential write operations. Sensitive tables including borrowers (password hashes, two-factor secrets, patron PII), api_keys, and sessions are all reachable; no public exploit identified at time of analysis and CISA KEV does not list this CVE.

Earlier versions of this analysis (1)
v1 Aug 04, 2026 - 18:28 CVSS 6.5

SQL injection in Koha's reports/issues_avg_stats.pl exposes sensitive library database tables to authenticated staff users holding the reports module permission. The vulnerable calculate subroutine concatenates user-controlled Line, Column, and Filter HTTP parameters directly into SQL query strings - including in identifier positions and unparameterized comparison fragments - with no whitelist validation. Exploitation allows arbitrary SQL reads against any table accessible by the Koha database user, including borrowers (patron password hashes, two-factor secrets, PII), api_keys, and sessions. Patches are available across all affected release lines; no public exploit has been identified at time of analysis.

RemediationAI

Upgrade to a fixed release: Koha 24.11.17, 25.11.06, 25.05.12, or 26.05.01, as documented in the release announcement at https://koha-community.org/koha-25-05-12-released/ and the upstream bug report at https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42368. The 25.05.12 tarball is available at https://download.koha-community.org/koha-25.05.12.tar.gz. Where immediate patching is not possible, revoke the reports module permission from all staff accounts that do not operationally require it - this directly eliminates the exposed attack surface since the vulnerable endpoint enforces that permission check before execution; the trade-off is loss of ad-hoc reporting capability for those users. Additionally, restrict Koha's database user to the minimum required privileges and consider placing the Koha database on a network segment inaccessible from general staff workstations, reducing lateral data exfiltration paths. Audit reports/issues_avg_stats.pl access in web server logs for anomalous or encoded parameter values as an interim detection control.

Affected VersionsENISA

Koha 0 <24.11.17
Koha 25.11.00 <25.11.06
Koha 25.05.00 <25.05.12
Koha 26.05.00 <26.05.01

Affected Packages

euvd koha fix: 24.11.17, 25.05.12, 25.11.06, 26.05.01

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Koha is an open-source integrated library system (ILS) written primarily in Perl. The vulnerability resides in the calculate subroutine within reports/issues_avg_stats.pl, which constructs SQL dynamically by string-concatenating user-supplied HTTP request parameters rather than using parameterized queries or prepared statements. The Line and Column parameters land directly in SQL identifier positions - SELECT DISTINCTROW, GROUP BY, and ORDER BY clauses - where standard quoting does not apply and whitelist validation is absent. Filter slot values are concatenated raw into single-quoted LIKE, BETWEEN, and equality predicates, making them susceptible to classic quote-escape injection. CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) is the precise root cause: the Perl code treats user input as trusted query structure rather than as data to be bound. The Koha database user in a typical deployment holds broad DML privileges across all library tables, amplifying the blast radius of any successful injection.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

Network-reachable web endpoint, low-privilege staff credential required (PR:L), no user interaction, full DB read confirmed and write plausible given typical Koha DB user grants.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c).

CVSS VectorVendor: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

5
Analysis Updated
Aug 05, 2026 - 13:48 vuln.today
v2 - CVSS changed
Severity Changed
Aug 05, 2026 - 13:37 NVD
MEDIUM HIGH
CVSS changed
Aug 05, 2026 - 13:37 NVD
6.5 (MEDIUM) 8.8 (HIGH)
Patch available
Aug 04, 2026 - 14:16 EUVD
CVE Published
Aug 04, 2026 - 13:18 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

Koha's reports/issues_avg_stats.pl builds dynamic SQL in sub calculate by concatenating several user-controlled request parameters directly into the query string. The Line and Column parameters are not validated against any whitelist and land verbatim in identifier positions (SELECT DISTINCTROW, GROUP BY, ORDER BY), and each Filter slot is concatenated raw into single-quoted LIKE, BETWEEN, and comparison fragments 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), api_keys, and sessions.

Executive ViewAI

Why It Matters

Koha library management systems are vulnerable to SQL injection in the reports module, allowing authenticated staff with reports permission to extract sensitive patron data including passwords, two-factor authentication secrets, and personally identifiable information. Libraries using affected Koha versions face direct exposure of patron privacy data and potential credential compromise, making this a critical priority for any organization subject to data protection regulations.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Low
open-source ILS deployed primarily in library sector
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy