Skip to main content

Insecure functionality - Masking


The system is not masking the data in the request and/or response, allowing sensitive and confidential information to be known.


Become aware of sensitive and/or confidential user information.


The system sends sensitive information through a channel or method that does not guarantee its confidentiality or integrity.


Anonymous attacker from adjacent network running a MitM.

Expected Remediation Time

⌚ 30 minutes.


Default score using CVSS 3.1. It may change depending on the context of the vulnerability.


  • Attack vector: A
  • Attack complexity: H
  • Privileges required: N
  • User interaction: R
  • Scope: U
  • Confidentiality: H
  • Integrity: N
  • Availability: N


  • Exploit code madurity: P
  • Remediation level: X
  • Report confidence: X


  • Vector string: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N/E:P/RL:X/RC:X
  • Score:
    • Base: 4.8
    • Temporal: 4.6
  • Severity:
    • Base: Medium
    • Temporal: Medium

Code Examples

Compliant code

Sensitive user information is sent masked

const accessRecoveryEmail = (req, res) => {
if (isValidUser(req.body.user)) {
if (validateToken == req.body.token){
//Implement a function to mask sensitive information
const recoveryEmail = getRecoveryEmail(req.body.userId);
const maskedEmail = MaskData.maskJSONFields(recoveryEmail, maskJSONOptions);

Non compliant code

The application sends potential sensitive information without masking

const accessRecoveryEmail = (req, res) => {
if (isValidUser(req.body.user)) {
if (validateToken == req.body.token){
//Sending unmasked sensitive information
const recoveryEmail = getRecoveryEmail(req.body.userId);


free trial

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.