CVE-2023-51295
Executive Summary
CVE-2023-51295 identifies a set of HTML Injection vulnerabilities in PHPJabbers Event Booking Calendar v4.0. The vulnerability allows an attacker to inject arbitrary HTML code into multiple parameters, including name, plugin_sms_api_key, plugin_sms_country_code, title, and plugin_sms_api_key (duplicate). This can lead to Cross-Site Scripting (XSS) attacks, defacement, or phishing campaigns when the injected content is rendered in a victim's browser. The vendor has not released a patch, and the CVSS score is currently unassigned (0.0). The EPSS score is 0.0%, indicating low exploitation probability in the wild, but the lack of a patch makes this a persistent risk for any deployment.
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.
No signup required
Supply Chain & Package Security
This vulnerability is not related to an NPM, PyPI, Go, or Ruby package. It is a standalone PHP application (Event Booking Calendar) distributed by PHPJabbers. The risk is primarily to end-users who have installed this software on their web servers.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, which is unusual and likely indicates that the NVD has not yet fully analyzed or assigned a score. Based on the nature of the vulnerability (HTML Injection leading to XSS), a reasonable 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. The vulnerability requires user interaction (e.g., clicking a link or viewing a page), but the lack of authentication and the ability to inject arbitrary HTML makes it a viable vector for phishing and social engineering attacks.
Deep Dive & Mechanics
The vulnerability resides in the input validation and output encoding of the Event Booking Calendar application. The following parameters are not sanitized before being rendered in the HTML response:
nameplugin_sms_api_keyplugin_sms_country_codetitle
An attacker can craft a URL or form submission containing malicious HTML/JavaScript in these fields. When the application processes the request and displays the data (e.g., in an admin panel or user-facing page), the injected code is executed in the context of the victim's browser.
Example Attack Vector:
An attacker sends a link to an admin: http://target.com/event-booking/index.php?name=<script>alert('XSS')</script>. If the admin clicks the link and the application reflects the name parameter without encoding, the script executes.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is the entire v4.0 release. The application likely uses PHP's $_GET or $_POST directly without proper escaping.
Vulnerable Code (PHP):
<?php
$name = $_GET['name'];
echo "Hello, " . $name;
?>
Patched Code (Hypothetical):
<?php
$name = htmlspecialchars($_GET['name'], ENT_QUOTES, 'UTF-8');
echo "Hello, " . $name;
?>
The fix requires applying htmlspecialchars() or equivalent output encoding to all user-controlled parameters before rendering them in HTML.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A local or remote instance of PHPJabbers Event Booking Calendar v4.0.
- A web browser with developer tools.
Step-by-Step Exploitation:
Identify Vulnerable Parameters: Navigate to the application and look for forms or URLs that use the parameters
name,plugin_sms_api_key,plugin_sms_country_code, ortitle.Craft Payload: Use a simple HTML injection payload to test:
<h1>Injected</h1>Or a JavaScript payload for XSS:
<script>alert('XSS')</script>Inject via URL (GET):
http://target.com/event-booking/index.php?name=<script>alert('XSS')</script>Inject via Form (POST): Submit a form with the
namefield containing:<img src=x onerror=alert(1)>Verify Execution: If the injected HTML/JavaScript renders in the page, the vulnerability is confirmed.
Exploit-DB Code: None available.
Blue Team (Defensive)
Detection Steps:
- Monitor Web Logs: Look for requests containing HTML tags or JavaScript in the
name,plugin_sms_api_key,plugin_sms_country_code, ortitleparameters. - WAF Rules: Deploy a Web Application Firewall (WAF) rule to block requests with
<script>oronerrorin these parameters. - Input Validation: Implement server-side validation to reject any input containing HTML tags.
- Output Encoding: Ensure all user-supplied data is encoded before rendering.
Lab Setup for Testing:
- Install PHPJabbers Event Booking Calendar v4.0 on a local XAMPP/WAMP server.
- Use Burp Suite or OWASP ZAP to intercept and modify requests.
- Test with the payloads above.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests containing
<script>,<img, oronerrorin thename,plugin_sms_api_key,plugin_sms_country_code, ortitleparameters. - Unusual referrer headers from phishing sites.
Host IOCs:
- Log entries showing HTML injection attempts in web server logs (e.g., Apache
access.log). - Presence of unexpected HTML elements in the application's output.
File IOCs:
- Modified PHP files if the attacker achieved code execution (unlikely from HTML injection alone).
Detection Engineering
YARA Rule
rule CVE_2023_51295_HTML_Injection {
meta:
description = "Detects HTML injection attempts targeting PHPJabbers Event Booking Calendar v4.0"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-51295"
strings:
$param1 = "name="
$param2 = "plugin_sms_api_key="
$param3 = "plugin_sms_country_code="
$param4 = "title="
$html_tag = /<[a-z][\s\S]*>/i
condition:
any of ($param*) and $html_tag
}
Sigma Rule
title: CVE-2023-51295 HTML Injection Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects HTML injection attempts in PHPJabbers Event Booking Calendar v4.0
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- 'name=<'
- 'plugin_sms_api_key=<'
- 'plugin_sms_country_code=<'
- 'title=<'
condition: selection
falsepositives:
- Legitimate use of HTML in parameters (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-51295 HTML Injection Attempt"; flow:to_server; content:"name=<"; nocase; http_uri; pcre:"/<[a-z][\s\S]*>/i"; sid:1000001; rev:1;)
alert http any any -> any any (msg:"CVE-2023-51295 HTML Injection Attempt"; flow:to_server; content:"plugin_sms_api_key=<"; nocase; http_uri; pcre:"/<[a-z][\s\S]*>/i"; sid:1000002; rev:1;)
alert http any any -> any any (msg:"CVE-2023-51295 HTML Injection Attempt"; flow:to_server; content:"plugin_sms_country_code=<"; nocase; http_uri; pcre:"/<[a-z][\s\S]*>/i"; sid:1000003; rev:1;)
alert http any any -> any any (msg:"CVE-2023-51295 HTML Injection Attempt"; flow:to_server; content:"title=<"; nocase; http_uri; pcre:"/<[a-z][\s\S]*>/i"; sid:1000004; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Application: If possible, take the Event Booking Calendar offline until a patch is available.
- Input Validation: Implement server-side validation to reject any input containing HTML tags or JavaScript.
- Output Encoding: Apply
htmlspecialchars()or equivalent to all user-controlled parameters before rendering. - WAF Rules: Deploy WAF rules to block HTML injection attempts.
Long-Term Fix:
- Contact PHPJabbers for an official patch or consider migrating to a different, actively maintained booking calendar solution.
Workaround:
- Use a reverse proxy (e.g., Nginx) to filter out malicious parameters:
if ($args ~* "(name|plugin_sms_api_key|plugin_sms_country_code|title)=<") { return 403; }
Valters IT
Securing Digital Frontiers
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.