Business information leak - Corporate information
Description
It is possible to access information about some of the company employees, such as their roles and contact information.
Impact
Obtain information about the role played by some workers within the company. As well as their contact information.
Recommendation
Establish controls to prevent an attacker from accessing the organizations corporate information.
Threat
Attacker with access to the application from the Internet.
Expected Remediation Time
⌚ 45 minutes.
Score
Default score using CVSS 3.1. It may change depending on the context of the vulnerability.
Base
- Attack vector: N
- Attack complexity: L
- Privileges required: L
- User interaction: N
- Scope: U
- Confidentiality: L
- Integrity: N
- Availability: N
Temporal
- Exploit code madurity: X
- Remediation level: X
- Report confidence: X
Result
- Vector string: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N/E:X/RL:X/RC:X
- Score:
- Base: 4.3
- Temporal: 4.3
- Severity:
- Base: Medium
- Temporal: Medium
Code Examples
Compliant code
The application restrics only admin users to access the sensitive information
const getUserInfo = (req, res) => {
const userCredentials = getCredentials(req.body.userId);
if (isValidUser(req.body.user) && userCredentials == "ADMIN") {
const requestedUser = req.body.requiredUser;
res.send(requestedUser.email);
res.send(requestedUser.phone);
}
}
Non compliant code
The application does not validate the user permissions to access the information
const getUserInfo = (req, res) => {
if (isValidUser(req.body.user)) {
const requestedUser = req.body.requiredUser;
res.send(requestedUser.email);
res.send(requestedUser.phone);
}
}
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.