Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
PR:L reflects mandatory label_creator staff authentication; C:H reflects full database read access; I:N and A:N because only read exploitation is described.
Primary rating from Vendor (TuranSec).
CVSS VectorVendor: TuranSec
Lifecycle Timeline
2DescriptionCVE.org
A stored SQL injection vulnerability in Koha through 24.11.17, 25.05.12, 25.11.06, and 26.05.01 allows authenticated staff with the tools => label_creator permission to execute arbitrary SQL via the image_name field of a patron card layout. The image_name value is stored verbatim in the layout XML and later concatenated raw into a SQL query in patroncards/create-pdf.pl when a patron card batch is printed. An attacker can read the entire Koha database including patron PII and staff bcrypt password hashes via error-based or time-based blind injection.
AnalysisAI
Stored SQL injection in Koha's patron card layout feature allows authenticated staff with the label_creator permission to exfiltrate the entire library database, including patron PII and staff bcrypt password hashes. The image_name field is persisted verbatim into layout XML without sanitization and later concatenated raw into a SQL query inside patroncards/create-pdf.pl when a patron card batch is printed, creating a second-order injection that fires on a routine staff action. No public exploit code has been identified at time of analysis and the vulnerability is not listed in the CISA KEV catalog, but the high confidentiality impact and low privilege requirement make this a meaningful priority for library operators running affected releases.
Technical ContextAI
Koha is a widely deployed open-source integrated library system (ILS) used by public, academic, and special libraries. The vulnerable component is the patron card creator subsystem; specifically the Perl script patroncards/create-pdf.pl, which generates printable patron card PDFs from stored layout definitions. The image_name field of a patron card layout is accepted from staff input, stored verbatim in a layout XML document, and at print time is concatenated directly into a SQL query string without parameterization or escaping. This is a textbook CWE-89 (Improper Neutralization of Special Elements Used in an SQL Command) instance, specifically a stored or second-order SQL injection, where the payload is injected at layout creation time and triggered later during PDF generation. The separation between injection and execution points can defeat inline WAF rules that inspect only the current request body. The CPE string cpe:2.3:a:koha_community:koha:*:*:*:*:*:*:*:* confirms all Koha versions up to the stated thresholds are affected.
RemediationAI
Operators should upgrade to the first patched release beyond each affected branch threshold - post-24.11.17, post-25.05.12, post-25.11.06, or post-26.05.01 - as soon as the Koha community publishes corrected builds. Exact patched version numbers are not confirmed in the available data; monitor the official release channel at https://koha-community.org/ and the Bugzilla entry at https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42747 for release announcements. As an immediate compensating control before patching, audit and restrict the tools => label_creator permission to the smallest possible set of fully trusted staff; removing this permission from untrusted accounts eliminates the attack surface entirely but may disrupt patron card printing workflows. Additionally, review all existing patron card layouts for anomalous image_name values containing SQL metacharacters (single quotes, UNION, SELECT, SLEEP, etc.) as indicators of prior exploitation. If database activity monitoring is available, add alerting for unusual query patterns on the Koha database schema, particularly error responses or time-delay anomalies during PDF generation jobs.
Cross Site Scripting vulnerability in Koha ILS 23.05 and before allows a remote attacker to execute arbitrary code via t
KOHA Library System version 16.11.x (up until 16.11.13) and 17.05.x (up until 17.05.05) contains a Cross Site Request Fo
CSV Injection vulnerability in '/members/moremember.pl' and '/admin/aqbudgets.pl' endpoints in Koha Library Management S
An issue in Koha ILS 23.05 and before allows a remote attacker to execute arbitrary code via a crafted script to the for
KOHA Library System version 16.11.x (up until 16.11.13) and 17.05.x (up until 17.05.05) contains a Cross Site Scripting
Koha versions 25.11 and earlier contain a stored cross-site scripting vulnerability in the News function that allows aut
A vulnerability was found in KOHA up to 23.05.03. Rated medium severity (CVSS 5.4), this vulnerability is remotely explo
SQL injection in Koha's guided report builder (`reports/guided_reports.pl`) allows any authenticated staff member holdin
Cross-site scripting (XSS) vulnerability in opac-addbybiblionumber.pl in Koha 3.14.x before 3.14.16, 3.16.x before 3.16.
Authenticated remote code execution in Koha lets anyone who can reach the affected web service on TCP port 8081 feed a c
SQL injection in the Koha library management system's staff interface allows authenticated users to manipulate the displ
Multiple cross-site scripting (XSS) vulnerabilities in the Staff client in Koha before 3.16.6 and 3.18.x before 3.18.2 a
Same weakness CWE-89 – SQL Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-56129
GHSA-xg24-96fx-vx3g