New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

The SecOps Group CAP Exam - Topic 10 Question 92 Discussion

Actual exam question for The SecOps Group's CAP exam
Question #: 92
Topic #: 10
[All CAP Questions]

After purchasing an item on an e-commerce website, a user can view their order details by visiting the URL:

https://example.com/?order_id=53870

A security researcher pointed out that by manipulating the order_id value in the URL, a user can view arbitrary orders and sensitive information associated with that order_id. There are two fixes:

(Bob's Fix): In order to fix this vulnerability, a developer called Bob devised a fix so that the URL does not disclose the numeric value of the order_id but uses a SHA1 hash of the order_id in the URL, such as:

https://example.com/?order_id=1ff0fe6f1599536d1326418124a261bc98b8ea1

Note: that the SHA1 value of 53870 is 1ff0fe6f1599536d1326418124a261bc98b8ea1

(John's Fix): Another developer called John devised a different fix so that the URL does not disclose the numeric value of the order_id and uses a Base64 encoded value of the order_id in the URL, such as:

https://example.com/?order_id=NTM4NzA=

Note: that the Base64 encoded value of 53870 is NTM4NzA=

Which of the following is correct?

Show Suggested Answer Hide Answer
Suggested Answer: B

The vulnerability described is an Insecure Direct Object Reference (IDOR), where manipulating the order_id (e.g., 53870) allows unauthorized access to other users' orders. The fixes proposed by Bob and John aim to obscure the numeric value of order_id to prevent easy guessing or manipulation:

Bob's Fix (SHA1 Hash): Replaces order_id=53870 with order_id=1ff0fe6f1599536d1326418124a261bc98b8ea1 (SHA1 hash of 53870). While this obscures the original value, an attacker can still attempt to hash potential order IDs (e.g., 53871, 53872) and test them in the URL. If the application directly uses the hash to look up the order without validating the user's authorization, the vulnerability persists. SHA1 is a one-way hash, but it does not inherently enforce access control.

John's Fix (Base64 Encoding): Replaces order_id=53870 with order_id=NTM4NzA= (Base64 encoding of 53870). Base64 is a reversible encoding, and an attacker can easily decode NTM4NzA= back to 53870 using standard tools. If the application decodes it and uses the original value to fetch orders without authorization checks, the IDOR vulnerability remains.

Evaluation: Both fixes address the symptom (disclosing the numeric value) but fail to address the root cause: lack of authorization validation. The application must ensure that only the authenticated user can access their own orders, regardless of the order_id format (numeric, hashed, or encoded). Neither fix includes such a check, so the vulnerability persists.

Option A ('Both solutions are adequate to fix the problem'): Incorrect, as neither solution enforces authorization.

Option B ('Both solutions are inadequate and the vulnerability is still not fixed'): Correct, as both SHA1 hashing and Base64 encoding are superficial changes that do not prevent unauthorized access.

Option C ('Only John's solution fixes the problem'): Incorrect, as John's Base64 encoding is reversible and does not fix the IDOR issue.

Option D ('Only Bob's solution fixes the problem'): Incorrect, as Bob's SHA1 hashing also does not address the authorization flaw.

The correct answer is B, aligning with the CAP syllabus under 'Insecure Direct Object Reference (IDOR)' and 'Access Control Best Practices.'


Contribute your Thoughts:

0/2000 characters
Charlesetta
2 months ago
Both fixes are inadequate; we need a more robust solution.
upvoted 0 times
...
Mendy
2 months ago
I think Bob's fix is better since SHA1 is more secure than Base64.
upvoted 0 times
...
Gussie
3 months ago
Wait, can you really access other orders just by changing the ID?
upvoted 0 times
...
Art
3 months ago
I disagree, John's solution is just as good as Bob's!
upvoted 0 times
...
Brett
3 months ago
Both solutions are still vulnerable to brute force attacks.
upvoted 0 times
...
Selma
3 months ago
I thought Base64 was just an encoding method, so it might not really secure the order_id. I lean towards saying both fixes are inadequate.
upvoted 0 times
...
Jarvis
4 months ago
I practiced a similar question where we had to evaluate the effectiveness of encoding versus hashing. I feel like Bob's fix is better, but I can't recall why exactly.
upvoted 0 times
...
Latrice
4 months ago
I think both solutions might still expose the order details if someone can decode Base64 or reverse the hash.
upvoted 0 times
...
Jerlene
4 months ago
I remember discussing how hashing can help with security, but I'm not sure if SHA1 is strong enough for this.
upvoted 0 times
...
Casandra
4 months ago
I'm feeling pretty confident about this one. The Base64 encoding solution seems like the more secure approach to me.
upvoted 0 times
...
Jess
4 months ago
Okay, I think I've got a handle on this. Let me walk through the pros and cons of each solution and see which one is more secure.
upvoted 0 times
...
Delsie
5 months ago
Hmm, I'm a bit confused about the security implications of each approach. I'll need to think this through step-by-step.
upvoted 0 times
...
Carma
5 months ago
This seems like a tricky question. I'll need to carefully consider the differences between the two proposed solutions.
upvoted 0 times
...
Tracey
11 months ago
I think Sue's solution is better because it uses a SHA1 hash
upvoted 0 times
...
Ardella
11 months ago
Wait, are we sure these fixes actually work? What if someone can still figure out the order IDs through other means? This seems like a tricky vulnerability to fully address.
upvoted 0 times
Renea
9 months ago
User 4: That's a good point, we need to consider other potential vulnerabilities.
upvoted 0 times
...
Rickie
9 months ago
User 3: But what if there are other ways to find the order IDs?
upvoted 0 times
...
Alberto
9 months ago
User 2: I agree, they both seem to address the issue.
upvoted 0 times
...
Carisa
9 months ago
User 1: I think both solutions are good.
upvoted 0 times
...
Felicidad
9 months ago
User 4: That's a good point, we need to consider other possible vulnerabilities.
upvoted 0 times
...
Clarinda
10 months ago
User 3: But what if there are other ways to find out the order IDs?
upvoted 0 times
...
Filiberto
10 months ago
User 2: I agree, they both seem to address the issue.
upvoted 0 times
...
Roxanne
10 months ago
User 1: I think both solutions are good.
upvoted 0 times
...
...
Willodean
11 months ago
I disagree, I believe only John's solution fixes the problem
upvoted 0 times
...
Gennie
11 months ago
John's solution looks interesting, but I'm not sure if Base64 encoding is really secure enough. I'd go with Bob's fix.
upvoted 0 times
...
Sue
11 months ago
I agree with Dalene, both solutions seem adequate
upvoted 0 times
...
Elvera
11 months ago
Hmm, I think Bob's solution is better. Using a hash value makes the order ID more secure and less obvious.
upvoted 0 times
Lon
10 months ago
User 3: I think Bob's fix is the way to go for sure.
upvoted 0 times
...
Peggie
10 months ago
User 2: Yeah, using a hash value definitely adds an extra layer of security.
upvoted 0 times
...
Meaghan
10 months ago
User 1: I agree, Bob's solution seems more secure.
upvoted 0 times
...
...
Dalene
11 months ago
I think both solutions are good
upvoted 0 times
...

Save Cancel