MEDIUM 5.4

CVE-2026-50767: Stored XSS in Koha Library Management System

Koha Library Management System contains a stored cross-site scripting (XSS) vulnerability in its item type administration interface. An authenticated administrator can inject malicious scripts into the check-in message field, which are then stored and executed in the browsers of other users who view that item type. This is a persistence threat rather than a one-time attack—the malicious script remains embedded until manually removed.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weaknesses (CWE)
CWE-79
Affected products
1 configuration(s)
Published / Modified
2026-06-26 / 2026-07-05

NVD description (verbatim)

A stored cross-site scripting (XSS) vulnerability in the item type administration page of Koha Library Management System 0 through 25.11 versions allow an authenticated remote attacker with administrator privileges to inject arbitrary web scripts via the item type check-in message field (checkinmsg).

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-50767 is a stored XSS vulnerability (CWE-79) affecting Koha versions 0 through 25.11. The vulnerability exists in the item type administration page, specifically in the checkinmsg (check-in message) field. An authenticated user with administrator privileges can inject arbitrary JavaScript that persists in the database. When other users access the affected item type configuration or related interfaces, the stored script executes in their browser context, potentially enabling session hijacking, credential theft, or lateral movement within the library system.

Business impact

For library organizations, this vulnerability poses a direct threat to staff and patron data security. An insider threat or compromised administrator account could inject scripts that harvest login credentials from librarians, manipulate circulation records, or exfiltrate patron information. The persistence of stored XSS means malicious scripts remain active until discovery and remediation, extending exposure window and increasing detection difficulty. Organizations relying on Koha for sensitive patron privacy management face both operational disruption and regulatory liability under data protection frameworks.

Affected systems

Koha Library Management System versions 0 through 25.11 are vulnerable. This affects both on-premise and hosted deployments where administrator accounts exist. The vulnerability requires administrator-level authentication to exploit, limiting the threat pool to privileged internal users or attackers who have compromised administrative credentials. Organizations running current versions (25.11 and earlier) should treat this as an active risk.

Exploitability

Exploitation requires valid administrator credentials and direct access to the item type administration interface. The barrier to entry is moderate—an attacker must either be a trusted insider or successfully compromise an administrator account through separate means (phishing, credential reuse, etc.). Once access is obtained, injection is straightforward and requires no special tools. The reliance on user interaction (victims must view the affected page) and the requirement for prior authentication keep the CVSS score at Medium (5.4), but the stored nature of the payload and its execution across multiple user sessions creates compounding risk.

Remediation

Prioritize patching Koha to a version that remedies this XSS vulnerability. Verify the specific patched version number in the official Koha security advisory. Until patching is possible, implement input validation and output encoding controls on the checkinmsg field at the application layer if your deployment permits. Conduct an audit of recent changes to item type configurations and check administrator account activity logs for unauthorized modifications. Review any stored messages for suspicious JavaScript or HTML content.

Patch guidance

Check the Koha project's official security advisories and release notes for the corrected version number. Apply the patch during a scheduled maintenance window, as item type configuration changes may impact library operations during deployment. Test the patch in a staging environment first, verifying that legitimate check-in message functionality remains intact. Confirm that all existing item type records are sanitized of any injected content post-patch.

Detection guidance

Monitor Koha administrator account activity logs for modifications to item type configurations, particularly the checkinmsg field. Use browser developer tools or network inspection to examine the HTML/JavaScript returned when accessing item type administration pages—look for unexpected script tags or encoded payloads in message fields. Implement Content Security Policy (CSP) headers at the application or reverse proxy level to restrict script execution. Search your Koha database directly for suspicious patterns in the checkinmsg column (e.g., <script, javascript:, onerror=).

Why prioritize this

Although the CVSS score is Medium (5.4), this vulnerability merits prompt attention due to its stored nature, impact on multiple users, and the sensitive data libraries manage. The requirement for administrator authentication reduces immediate external risk, but insider threats and credential compromise are realistic attack scenarios in any organization. Libraries handling patron records subject to privacy regulations should treat this as high-priority for rapid patching and verification.

Risk score, explained

The CVSS v3.1 score of 5.4 (Medium) reflects the combination of low attack vector complexity, requirement for administrator-level privileges (PR:L), and user interaction (UI:R). The scope change (S:C) acknowledges that the script executes in the context of other users' sessions, creating cross-user impact. However, the lack of availability impact (A:N) and the reliance on stored payload discovery by a victim prevent a higher severity rating. In practice, organizational risk may be higher due to the persistence of the payload and the critical nature of library data.

Frequently asked questions

Can a non-administrator user exploit this vulnerability?

No. The vulnerability is accessible only to users with administrator privileges in Koha's item type administration interface. This significantly limits the attack surface to trusted internal staff or attackers who have stolen administrator credentials through other means.

Does this vulnerability allow remote code execution on the server?

No. This is a stored XSS vulnerability that executes in users' browsers, not on the Koha server itself. An attacker cannot directly execute system commands or access the server filesystem through this flaw. However, they could use the XSS to steal credentials or perform actions on behalf of authenticated users.

How do I check if my Koha installation has been exploited?

Examine your Koha database for the checkinmsg field in item type records—look for HTML tags, script tags, or JavaScript event handlers that should not be present in a normal message. Review administrator account audit logs for unauthorized modifications to item type settings. If you suspect compromise, check browser history and network logs on machines used to access the administration page.

Will patching remove existing malicious payloads from my database?

Patching the application code prevents future injection but does not automatically clean existing compromised records. After patching, manually audit and sanitize any item type check-in messages that contain suspicious content, or use database queries to search for and remove known malicious patterns.

This analysis is provided for informational purposes to assist security teams in risk assessment and remediation planning. SEC.co does not warrant the accuracy or completeness of this information. Consult official Koha security advisories and your vendor for authoritative patch information and version-specific guidance. Testing patches in non-production environments before deployment is strongly recommended. Vulnerability data and CVSS scores are based on published information current as of the analysis date and may be subject to revision. Source: NVD (public-domain), retrieved 2026-08-05. Analysis generated by SEC.co (claude-haiku-4-5).