Fictitious example
Finding F-03
Customer statements can be downloaded without signing in
HighCVSS 3.1 base score 7.5Demonstrated
Web application and API test
Evidence: what we did
- Signed in as test account A (account number 100481), one of the two test accounts named in the rules of engagement, we requested its latest statement.
- We sent the same request with the session cookie removed. The statement was still returned.
- Still without a session, we changed the account number to 100482, which belongs to test account B. Its statement was returned.
GET /statements/100482/latest HTTP/1.1
Host: portal.example.com
HTTP/1.1 200 OK
Content-Type: application/pdf
Sent with no session cookie or token. Every request and response in the path is in the evidence register.
Impact
Anyone who knows or guesses an account number can download that customer's statements. We went no further than the two test accounts, and opened no real customer's statement.
Fix
Require a signed-in session for every statement request, and check on the server that the statement belongs to the signed-in customer. That closes the flaw. As a second layer, use identifiers in links that cannot be guessed.
Retest steps
- With no session, request test account B's statement: expect 401, or a redirect to sign-in, and no file.
- Signed in as test account A, request test account B's statement: expect 403 or 404 and no file.
- Signed in as test account B, request its own statement: expect 200 and the file.