☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2018-25101

CVE-2018-25101 Cross-Site Scripting in L2c2technologies
📅 PUBLISHED: 2024-04-22 01:31 UTC 🔄 UPDATED: 2026-09-23 20:36 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.46%
👁️
0.46% probability
11.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
3.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2018-25101 is a stored cross-site scripting (XSS) vulnerability in the Koha open-source library management system, affecting versions up to and including the 20180108 release. The flaw resides in the /cgi-bin/koha/opac-MARCdetail.pl script, where the biblionumber parameter is not properly sanitized before being reflected in the response. An attacker can inject arbitrary HTML or JavaScript by crafting a malicious URL, leading to potential session hijacking, defacement, or data theft. The vulnerability has a low CVSS score of 3.5 due to the requirement for user interaction and the limited impact on confidentiality. A patch is available via commit 950fc8e101886821879066b33e389a47fb0a9782, and upgrading to a patched version is strongly recommended.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the Koha open-source project, which is distributed as a Perl-based application. While not a package manager dependency issue, organizations using Koha should verify their deployment version and apply the patch from the official repository. No known supply chain compromise has been reported.

CVSS Breakdown & Threat Level

  • CVSS Score: 3.5 (Low)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication is needed.
  • User Interaction: Required (UI:R) – The victim must click a crafted link or visit a malicious page.
  • Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
  • Confidentiality Impact: None (C:N) – No direct data exposure.
  • Integrity Impact: Low (I:L) – An attacker can modify content within the victim's browser session.
  • Availability Impact: None (A:N) – No denial-of-service effect.

Threat Level: Low. The requirement for user interaction significantly reduces the likelihood of automated exploitation. However, in a library context, a crafted link could be distributed via email or social engineering to target staff or patrons.

Deep Dive & Mechanics

The vulnerability is a classic reflected XSS in the Koha OPAC (Online Public Access Catalog) module. The file opac-MARCdetail.pl is responsible for displaying MARC (Machine-Readable Cataloging) record details. It accepts a biblionumber parameter via GET or POST to identify which record to display.

The root cause is the lack of output encoding when the biblionumber value is embedded in the HTML response. An attacker can inject a payload such as:

2"><script>alert('XSS')</script>

When the server processes this request, it reflects the unescaped input directly into the page source, causing the browser to execute the injected script. The attack is stored only in the sense that the malicious URL can be bookmarked or shared, but the payload is not persisted in the database.

The patch (commit 950fc8e101886821879066b33e389a47fb0a9782) introduces proper HTML entity encoding for the biblionumber parameter before output, neutralizing any injected HTML or JavaScript.

Vulnerable vs. Patched Code

Vulnerable Code (pre-patch):

# In opac-MARCdetail.pl
my $biblionumber = $cgi->param('biblionumber');
# ... later in the HTML output
print "<a href=\"/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=$biblionumber\">$biblionumber</a>";

Patched Code (post-patch):

# In opac-MARCdetail.pl
use HTML::Entities;
my $biblionumber = $cgi->param('biblionumber');
my $encoded_biblionumber = encode_entities($biblionumber);
# ... later in the HTML output
print "<a href=\"/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=$encoded_biblionumber\">$encoded_biblionumber</a>";

The patch uses the HTML::Entities module to encode special characters like <, >, ", and & into their HTML entity equivalents, preventing script injection.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A vulnerable Koha instance (version <= 20180108) accessible over the network.
  • A victim user who will click a crafted link.

Exploitation Steps:

  1. Craft a malicious URL:
    http://target/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=2%22%3E%3Cscript%3Ealert(%27XSS%27)%3C/script%3E
    
    (URL-encoded payload: 2"><script>alert('XSS')</script>)
  2. Send the link to a victim via email, chat, or embed it in a webpage.
  3. When the victim clicks the link, the script executes in their browser context.

Advanced Payload Example:

http://target/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=2%22%3E%3Cimg%20src=x%20onerror=alert(document.cookie)%3E

This payload steals the victim's cookies.

Blue Team

Detection:

  • Monitor web server logs for requests to /cgi-bin/koha/opac-MARCdetail.pl containing suspicious biblionumber parameters (e.g., <script>, onerror=, javascript:).
  • Use a Web Application Firewall (WAF) to block requests with HTML/JavaScript in the biblionumber parameter.

Mitigation:

  • Apply the patch immediately by updating Koha to a version that includes commit 950fc8e101886821879066b33e389a47fb0a9782.
  • If patching is not possible, implement a reverse proxy rule to sanitize the biblionumber parameter:
    location /cgi-bin/koha/opac-MARCdetail.pl {
        if ($arg_biblionumber ~* "<|>|script|onerror") {
            return 403;
        }
    }
    

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /cgi-bin/koha/opac-MARCdetail.pl with biblionumber containing HTML tags or JavaScript event handlers.
    • Example: GET /cgi-bin/koha/opac-MARCdetail.pl?biblionumber=2%22%3E%3Cscript%3Ealert(1)%3C/script%3E
  • File IOCs:
    • Unpatched file: opac-MARCdetail.pl (check for absence of HTML::Entities usage).
  • Log IOCs:
    • Web server access logs showing unusual biblionumber values.

Detection Engineering

YARA Rule

rule CVE_2018_25101_Koha_XSS {
    meta:
        description = "Detects exploitation attempts of CVE-2018-25101 in Koha opac-MARCdetail.pl"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2018-25101"
    strings:
        $xss_payload = /biblionumber=[^&]*<[^>]*script/i
        $xss_event = /biblionumber=[^&]*on\w+\s*=/i
    condition:
        any of them
}

Sigma Rule

title: CVE-2018-25101 Koha opac-MARCdetail.pl XSS Attempt
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP requests targeting Koha opac-MARCdetail.pl with suspicious biblionumber parameters
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: '/cgi-bin/koha/opac-MARCdetail.pl'
        cs-uri-query|re: 'biblionumber=.*<.*script'
    condition: selection
falsepositives:
    - Legitimate use of HTML in biblionumber (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2018-25101 Koha opac-MARCdetail.pl XSS Attempt"; flow:to_server,established; content:"/cgi-bin/koha/opac-MARCdetail.pl"; http_uri; pcre:"/biblionumber=[^&]*<[^>]*script/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Patch: Upgrade Koha to a version that includes commit 950fc8e101886821879066b33e389a47fb0a9782. This is the only complete fix.
  2. Virtual Patching: If immediate upgrade is not possible, deploy a WAF rule to block requests containing <script> or onerror in the biblionumber parameter.
  3. Input Validation: Implement server-side validation to reject any biblionumber that contains non-numeric characters (since biblionumbers are typically integers).
  4. Output Encoding: Ensure all user-supplied data is HTML-entity encoded before being rendered in the response.
  5. User Awareness: Educate staff and patrons about the risks of clicking suspicious links, especially those containing the Koha OPAC URL.

Valters IT
Securing Digital Infrastructure

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2018-25101/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.