Skip to content

Bind IDOR level 2 profile lookup to token owner - #228

Open
r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/idor-level-2
Open

r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/idor-level-2

Conversation

@r1kka6

@r1kka6 r1kka6 commented Aug 10, 2026

Copy link
Copy Markdown

Summary

  • derive the Level 2 profile id from the validated token instead of the client-controlled userId_level2 cookie
  • keep the existing login flow while making cookie tampering ineffective
  • update unit coverage to assert that a tampered cookie still resolves to the token owner

Verification

  • ./gradlew test spotlessJavaCheck bootJar --no-daemon passed in an eclipse-temurin:17-jdk container
  • vulnerable baseline lets Alice read Bob by changing userId_level2=1 to userId_level2=2
  • patched runtime returns Alice for both the original cookie and the tampered userId_level2=2 cookie

Signed-off-by: snow <snow@snows-MacBook-Pro-2.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant