Business information leak - Users
Description
Business information is obtained, such as:
- List of valid users.
Impact
Access to the code to identify that there is insufficiently protected business information.
Recommendation
According to the classification of the information found, establish the necessary controls so that the information is accessible only to the indicated persons.
Threat
Internal attacker with access to the code.
Expected Remediation Time
⌚ 60 minutes.
Score
Default score using CVSS 3.1. It may change depending on the context of the vulnerability.
Base
- Attack vector: A
- Attack complexity: L
- Privileges required: H
- User interaction: N
- Scope: U
- Confidentiality: L
- Integrity: N
- Availability: N
Temporal
- Exploit code madurity: F
- Remediation level: O
- Report confidence: X
Result
- Vector string: CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N/E:F/RL:O/RC:X
- Score:
- Base: 2.4
- Temporal: 2.3
- Severity:
- Base: Low
- Temporal: Low
Code Examples
Compliant code
Only authorized users with high credentials can access sensitive information
app.post('/accessUsers', isLoggedIn, function(req, res, next){
User.update({ _id: req.user.id}, req.body, function(err, user){
//Add controls to see if the user is Admin before accessing business information
const isUserAdmin = getUserCredentials(user.id);
if (isLoggedIn && isUserAdmin){
const users = getUserList(user.cipher_key);
updateDOM(users);
res.message("Valid Access);
res.redirect('/database/users');
}
}
});
Non compliant code
The application includes functionality that could allow an unauthorized user to access sensitive data
app.post('/accessUsers', isLoggedIn, function(req, res, next){
User.update({ _id: req.user.id}, req.body, function(err, user){
//It is possible to access the list of users with basic registration
if isLoggedIn{
const users = getUserList();
updateDOM(users);
res.message("Valid Access);
res.redirect('/database/users');
}
}
});
Requirements
- 176. Restrict system objects
- 177. Avoid caching and temporary files
- 261. Avoid exposing sensitive information
- 300. Mask sensitive data
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.