Account Takeover
Description
By exploiting one or several application vulnerabilities it is possible to take control over a user account and perform action on his behalf
Impact
- Affect the traceability and non-repudiation of the user's actions.
- Deny the access of a legitimate user to its own account
- Obtain potentially confidential information from the user account
Recommendation
Define account recovery mechannisms, validating that the requester is the account owner.
Threat
Authenticated attacker from the Internet
Expected Remediation Time
⌚ 100 minutes.
Score
Default score using CVSS 3.1. It may change depending on the context of the vulnerability.
Base
- Attack vector: N
- Attack complexity: H
- Privileges required: L
- User interaction: N
- Scope: U
- Confidentiality: L
- Integrity: L
- Availability: L
Temporal
- Exploit code madurity: H
- Remediation level: U
- Report confidence: C
Result
- Vector string: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L/E:H/RL:U/RC:C
- Score:
- Base: 5.0
- Temporal: 5.0
- Severity:
- Base: Medium
- Temporal: Medium
Code Examples
Compliant code
The application includes methods to validate the account owner is requesting the password change
public void recoverAccount(userEmail, userId){
if(isValidUser(userId, userEmail)) {
Account account = application.sendPasswordResetEmail(userEmail);
Account account = application.resetPassword("$TOKEN", "newPassword");
}
}
Non compliant code
The application does not validate the account owner is the same resetting the password
public void recoverAccount(useremail, userId){
if(isValidUser(userId)) {
Account account = application.sendPasswordResetEmail(userEmail);
Account account = application.resetPassword("newPassword");
}
}
Requirements
Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.