CVE-2026-50765: Stored XSS in Koha Library Management System Patron Restrictions
Koha Library Management System contains a stored cross-site scripting (XSS) vulnerability in its patron restriction type administration interface. An authenticated administrator can inject malicious JavaScript into restriction type labels, which is then stored and executed in the browsers of other users who view that page. This allows an insider threat to compromise other administrators' sessions or steal sensitive library data without requiring additional user interaction beyond normal administrative activities.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.1 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/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 patron restriction 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 restriction type label (display_text field).
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-50765 is a stored XSS vulnerability (CWE-79) affecting Koha versions 0 through 25.11. The vulnerability exists in the patron restriction type administration page, specifically in the display_text field used for restriction type labels. An authenticated attacker with administrator privileges can inject arbitrary JavaScript that persists in the application's database. When other users access the restriction administration interface, the malicious script executes in their browser context with their privileges, enabling session hijacking, credential theft, or further lateral movement within the library system.
Business impact
For libraries using Koha, this vulnerability creates an insider threat risk where a compromised or malicious administrator account can attack other staff members. The impact extends beyond the Koha system itself—library patron data, circulation records, and integrated systems (financial, ILS-connected discovery systems) could be exposed. In smaller libraries with limited IT oversight, a single compromised admin account could lead to unauthorized access to patron information, circulation history, and potentially integration with external systems. Recovery requires identifying and removing injected payloads and resetting affected administrator credentials.
Affected systems
All Koha Library Management System installations from version 0 through version 25.11 are vulnerable. The vulnerability requires administrator-level access to exploit, limiting the immediate attack surface to staff accounts with administrative privileges. Organizations running Koha should inventory their deployments and current patch levels immediately.
Exploitability
Exploitation requires valid administrator credentials to access the patron restriction type administration page. The vulnerability has a CVSS 3.1 score of 6.1 (MEDIUM) with a network-accessible vector, low attack complexity, and no privilege escalation required beyond the administrator role already held. While not in CISA's Known Exploited Vulnerabilities catalog, the straightforward injection mechanism and persistent storage nature mean exploitation is trivial once an attacker has admin access. The barrier is credential acquisition, not technical exploitation difficulty.
Remediation
Organizations should upgrade Koha to a patched version above 25.11 that implements output encoding and input validation on the restriction type display_text field. Until patches are available, restrict administrator account access to trusted personnel only, implement account activity monitoring, and consider disabling the patron restriction type administration feature if not actively used. Monitor web server and application logs for suspicious administrative activities.
Patch guidance
Verify patch availability from the Koha project's official release channels and security advisories. Apply patches to all Koha instances in your environment. Test patches in a non-production environment first to ensure compatibility with any local customizations. Given the administrator-only requirement, patches can often be deployed during standard maintenance windows without affecting patron-facing services.
Detection guidance
Monitor administrator access to the patron restriction type administration interface. Audit logs should capture modifications to restriction type records, particularly the display_text field. Search for unusual JavaScript patterns, HTML tags, or encoded payloads in restriction type labels. Network-based detection can identify reflected XSS attempts in HTTP parameters, though stored XSS detection requires application-level logging. Review administrator account activity for unexpected access times, geographic locations, or bulk modifications to restriction types.
Why prioritize this
While scored as MEDIUM severity, this vulnerability merits prompt attention because: (1) it affects a widely-deployed open-source library system, (2) stored XSS provides persistent compromise, (3) it affects sensitive patron data, and (4) the administrative access requirement, while limiting scope, makes it attractive to insider threats. Libraries are often targeted for patron data breaches. Prioritize based on your institution's reliance on Koha and the sensitivity of patron information in your system.
Risk score, explained
The CVSS 3.1 score of 6.1 reflects a network-accessible vulnerability with no privilege escalation required beyond the administrator role, but limited to users who can authenticate and reach the affected page. The score does not account for persistence (stored payload remains across sessions), the sensitivity of library patron data, or the trustworthiness typically placed in administrative interfaces, which may elevate practical risk above the base score in library environments.
Frequently asked questions
Do we need administrator access to be exploited by this vulnerability?
Yes. The attacker must already possess valid administrator credentials to inject the malicious script into the restriction type labels. This limits exploitation to insider threats or compromised administrative accounts, but does not require the attacker to escalate privileges from a lower role.
What versions of Koha are affected?
All versions from 0 through 25.11 are affected. Check your Koha instance version in the system administration settings. Consult the Koha project's official security advisories for the exact patched version available for your branch.
Can this vulnerability compromise patron privacy?
Potentially, yes. A malicious script injected via this vulnerability could capture session tokens, cookies, or other data visible in the administrator's browser, leading to broader compromise of patron records and circulation data. However, direct access to the database would require additional exploitation.
Is there a workaround if we cannot patch immediately?
Restrict administrator account access to trusted personnel only, disable two-factor authentication bypass mechanisms, and implement strong network segmentation around your Koha administrative interface. These are temporary mitigations only; patching is the definitive remediation.
This analysis is for informational purposes and based on publicly disclosed vulnerability data. SEC.co makes no warranties regarding completeness or applicability to your environment. Verify all patch versions, affected product editions, and remediation steps against the Koha project's official security advisories before deployment. Organizations should conduct their own risk assessments based on their specific Koha configurations, integrations, and data sensitivity. This vulnerability requires administrator credentials; assess your administrative access controls independently. Source: NVD (public-domain), retrieved 2026-08-05. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-26378MEDIUMKoha Invoice XSS Vulnerability – Stored Script Injection in Library Management
- CVE-2026-50766MEDIUMStored XSS in Koha Library Management System Item Notes
- CVE-2026-50767MEDIUMStored XSS in Koha Library Management System
- CVE-2016-20070MEDIUMPrivilege Escalation & Stored XSS in WordPress Booking Calendar Contact Form 1.0.23
- CVE-2018-25384MEDIUMStored XSS in Wikidforum 2.20 Allows Authenticated Attackers to Inject Malicious Scripts
- CVE-2019-25731MEDIUMStored XSS in Zuz Music 2.1 Contact Form
- CVE-2019-25737MEDIUMStored XSS in Live Chat Unlimited 2.8.3 – Admin Session Compromise
- CVE-2019-25739MEDIUMGigToDo 1.3 Stored XSS Vulnerability in Proposal Descriptions