CVE-2026-31844
Received Received - Intake
Authenticated SQL Injection in Koha's suggestion.pl Exposes Data

Publication date: 2026-03-11

Last updated on: 2026-03-11

Assigner: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c

Description
An authenticated SQL Injection vulnerability (CWE-89) exists in the Koha staff interface in the /cgi-bin/koha/suggestion/suggestion.pl endpoint due to improper validation of the displayby parameter used by the GetDistinctValues functionality. A low-privileged staff user can inject arbitrary SQL queries via crafted requests to this parameter, allowing execution of unintended SQL statements and exposure of sensitive database information. Successful exploitation may lead to full compromise of the backend database, including disclosure or modification of stored data.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-11
Last Modified
2026-03-11
Generated
2026-05-07
AI Q&A
2026-03-11
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
koha koha From 22.11.x (inc) to 24.11.x (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-89 The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

[{'type': 'paragraph', 'content': "CVE-2026-31844 is an authenticated SQL Injection vulnerability in the Koha library management system, specifically in the staff interface's suggestions feature handled by the script /cgi-bin/koha/suggestion/suggestion.pl."}, {'type': 'paragraph', 'content': 'The vulnerability occurs because the displayby parameter is used directly in SQL queries without proper sanitization or validation, allowing a low-privileged staff user to inject arbitrary SQL code.'}, {'type': 'paragraph', 'content': 'This injection can be exploited to perform error-based and time-based SQL injection attacks, enabling the attacker to retrieve sensitive backend database information such as user password hashes and potentially fully compromise the database.'}] [1]


How can this vulnerability impact me? :

This vulnerability allows a low-privileged staff user to execute arbitrary SQL queries on the Koha database.

  • Extraction of sensitive database information, including password hashes of users.
  • Potential full compromise of the backend database.
  • Disruption of normal staff interface operations due to error responses triggered by malicious input.

How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

[{'type': 'paragraph', 'content': 'This vulnerability can be detected by attempting to access the vulnerable URL with a malicious payload in the displayby parameter. Before patching, such requests cause HTTP 500 errors and generate error logs containing sensitive database information such as MySQL version or user password substrings.'}, {'type': 'paragraph', 'content': 'For detection, you can try sending crafted HTTP requests to the /cgi-bin/koha/suggestion/suggestion.pl endpoint with SQL injection payloads in the displayby parameter and monitor for 500 errors and unusual database error messages in logs.'}, {'type': 'list_item', 'content': 'Example curl command to test for the vulnerability (may cause errors):'}, {'type': 'list_item', 'content': "curl -i 'http://<koha-server>/cgi-bin/koha/suggestion/suggestion.pl?displayby=EXTRACTVALUE(1,CONCAT(0x7e,(SELECT @@version),0x7e))'"}, {'type': 'paragraph', 'content': 'Check the web server error logs for database error messages that leak information, which indicates the vulnerability is present.'}] [1]


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation involves applying the patches released by the Koha development team that validate and sanitize the displayby parameter to prevent SQL injection.

After applying the patch, restart the Koha service to ensure the fix is active.

Until the patch can be applied, restrict access to the vulnerable staff interface or monitor and block suspicious requests targeting the displayby parameter.

Verify the fix by confirming that requests with previously malicious payloads no longer cause errors or leak information, and that the staff interface functions normally.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart