CVE-2022-30356
Executive Summary
CVE-2022-30356 is a privilege escalation vulnerability in OvalEdge versions 5.2.8.0 and earlier. The flaw allows an authenticated user with the OE_ADMIN role to escalate their privileges by sending a crafted POST request to the /user/assignuserrole endpoint. By manipulating the userid and role parameters, an attacker can assign any role (including higher-privileged roles) to any user, effectively bypassing intended access controls. This vulnerability is classified as a privilege escalation (CWE-269) and aligns with MITRE ATT&CK tactic T1068 (Exploitation for Privilege Escalation). No official patch has been released, and the vendor has not provided a fix.
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 open-source package (NPM, PyPI, Go, Ruby). It affects a proprietary enterprise application (OvalEdge). Therefore, supply chain security concerns are limited to the vendor's software distribution and update mechanisms.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0 in the NVD data, which is likely a placeholder. Based on the vulnerability description, a reasonable CVSS v3.1 vector would be:
- Attack Vector (AV): Network (N) – The attack is performed over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): Low (L) – The attacker needs an authenticated session with
OE_ADMINrole. - User Interaction (UI): None (N) – No user interaction is required.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) – An attacker can gain access to sensitive data.
- Integrity (I): High (H) – An attacker can modify data or assign roles.
- Availability (A): High (H) – An attacker could potentially disrupt operations.
Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Estimated Base Score: 8.8 (High)
Threat Level: High. The vulnerability requires authentication but allows a user with OE_ADMIN privileges to escalate to any role, potentially gaining full administrative control over the OvalEdge application.
Deep Dive & Mechanics
The vulnerability resides in the /user/assignuserrole endpoint. The application fails to properly validate whether the authenticated user has the authority to assign a specific role to another user. The OE_ADMIN role is intended to allow user management, but the application does not enforce a hierarchical check to prevent an OE_ADMIN from assigning themselves or others a higher-privileged role (e.g., OE_SUPER_ADMIN).
The POST request parameters userid and role are directly used to update the user-role mapping in the backend database. The server-side code likely executes a query similar to:
UPDATE user_roles SET role_id = :role WHERE user_id = :userid
Without verifying that the requesting user's role is superior to the role being assigned, an attacker can simply change the role parameter to a higher-privileged role ID.
Vulnerable vs. Patched Code
Since no official patch is available, a comparison is based on expected secure implementation.
Vulnerable Code (Conceptual):
@app.route('/user/assignuserrole', methods=['POST'])
def assign_user_role():
userid = request.form['userid']
role = request.form['role']
# No privilege check
db.execute("UPDATE user_roles SET role_id = ? WHERE user_id = ?", (role, userid))
return "Role assigned"
Patched Code (Conceptual):
@app.route('/user/assignuserrole', methods=['POST'])
def assign_user_role():
current_user_role = get_current_user_role()
target_role = get_role_by_id(request.form['role'])
# Check if current user's role is higher than the target role
if current_user_role.priority >= target_role.priority:
return "Forbidden", 403
userid = request.form['userid']
db.execute("UPDATE user_roles SET role_id = ? WHERE user_id = ?", (target_role.id, userid))
return "Role assigned"
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Access to an OvalEdge instance (version <= 5.2.8.0).
- Valid credentials for a user with the
OE_ADMINrole.
Exploitation Steps:
- Authenticate to the OvalEdge web interface and obtain a session cookie (e.g.,
JSESSIONID). - Craft a POST request to the
/user/assignuserroleendpoint with the following parameters:userid: The ID of the target user (can be the same as the attacker's user ID).role: The ID of a higher-privileged role (e.g.,OE_SUPER_ADMIN).
- Send the request using a tool like
curl:
curl -X POST https://target-ovaledge.com/user/assignuserrole \
-H "Cookie: JSESSIONID=valid_session_id" \
-d "userid=1&role=2"
- Verify escalation by accessing a restricted endpoint or checking the user's role in the application.
Expected Outcome: The target user (or the attacker) is now assigned the higher-privileged role, granting full administrative access.
Blue Team (Detection & Hardening)
Detection:
- Monitor logs for POST requests to
/user/assignuserrolewith unusualroleparameter values. - Alert on any role assignment where the
roleparameter corresponds to a higher-privileged role than the requesting user's role.
Hardening:
- Implement server-side validation to ensure that a user can only assign roles that are equal to or lower than their own role.
- Apply the principle of least privilege: the
OE_ADMINrole should not be able to assignOE_SUPER_ADMINor other critical roles. - Use a Web Application Firewall (WAF) to block requests with suspicious
roleparameter values.
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/user/assignuserrolewith parametersuseridandrole. - Unusual
roleparameter values (e.g., role IDs that correspond toOE_SUPER_ADMINor other high-privilege roles).
- POST requests to
- System IOCs:
- Audit logs showing unexpected role assignments.
- User accounts with elevated privileges that were not granted through normal administrative processes.
- File IOCs:
- Modified database entries in the
user_rolestable.
- Modified database entries in the
Detection Engineering
YARA Rule
rule CVE_2022_30356_OvalEdge_PrivEsc {
meta:
description = "Detects exploitation attempts of CVE-2022-30356 in OvalEdge logs"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2022-30356"
strings:
$s1 = "/user/assignuserrole" ascii wide nocase
$s2 = "userid=" ascii wide nocase
$s3 = "role=" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: OvalEdge Privilege Escalation via /user/assignuserrole
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects POST requests to /user/assignuserrole with role parameter indicating privilege escalation
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/user/assignuserrole'
cs-uri-query|contains: 'role='
condition: selection
falsepositives:
- Legitimate role assignments by authorized administrators
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2022-30356 OvalEdge Privilege Escalation Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/user/assignuserrole"; http_uri; content:"role="; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade to a patched version of OvalEdge if available. Contact the vendor for a fix.
- Restrict access to the
/user/assignuserroleendpoint using network-level controls (e.g., firewall rules) to only allow trusted IP addresses. - Review and audit all user roles and permissions to ensure no unauthorized privilege escalation has occurred.
Long-term Mitigations:
- Implement role-based access control (RBAC) with strict hierarchical validation.
- Enable detailed logging for all role assignment operations.
- Conduct regular security assessments and penetration testing on the OvalEdge application.
- Apply the principle of least privilege to all user roles.
Workaround:
- If patching is not possible, consider disabling the
/user/assignuserroleendpoint or modifying the application code to add privilege checks.
Valters IT
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.