Skip to main content

Sensitive information sent via URL parameters - Session

Description

The JWT session token is sent by the URL, which allows it to be cached by the browsing history, allowing attackers with local access to the machine to obtain it without any problem.

Impact

Obtain the users session.

Recommendation

Use secure mechanisms to send sensitive information between sites so that it cannot be stolen by malicious actors.

Threat

Unauthorized attacker with local access to the machine.

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: L
  • Attack complexity: L
  • Privileges required: N
  • User interaction: R
  • 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:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N/E:X/RL:X/RC:X
  • Score:
    • Base: 3.3
    • Temporal: 3.3
  • Severity:
    • Base: Low
    • Temporal: Low

Code Examples

Compliant code

The url responses does not include sensitive information

const getSession = (req, res) => {
//Not shown: Code to check user session credentials
app.get('/users/login', (req, res) => {
res.redirect("/profile/main");
})
}

Non compliant code

The application includes the jwt access token in the url response

const getSession = (req, res) => {
//Not shown: Code to check user session credentials

//Include the jwt in the response url
app.get('/users/:userJWT', (req, res) => {
res.redirect("url/"+req.params);
})
}

Requirements