Skip to content

Security fix player access#2533

Open
khushal-winner wants to merge 2 commits intoOWASP:masterfrom
khushal-winner:security-fix-player-access
Open

Security fix player access#2533
khushal-winner wants to merge 2 commits intoOWASP:masterfrom
khushal-winner:security-fix-player-access

Conversation

@khushal-winner
Copy link
Contributor

Closes - #2514

Add game_id validation in PlayerLive.Show.handle_params/3

Add player-game validation in ApiController.play_card/3

Return proper error responses for unauthorized access

Prevent cross-game player data access

  • before
2026-03-05.03-34-40.mp4
  • after
2026-03-05.19-21-01.mp4

- Add game_id validation in PlayerLive.Show.handle_params/3
- Add player-game validation in ApiController.play_card/3
- Implement security audit logging with IP addresses
- Return proper error responses for unauthorized access
- Prevent cross-game player data access

Security: Eliminates CVSS 9.1 critical vulnerability
Impact: Zero breaking changes to legitimate functionality

This commit contains only the core security fixes for IDOR vulnerability.
- Update PlayerLive.Show logging to use database values instead of URL parameters
- Prevent potential injection attacks in security audit logs
- Use player.id and player.game_id from verified database records
- Maintain security validation while eliminating log injection risks
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