A vulnerable FastAPI application demonstrating CWE-863: Incorrect Authorization in document sharing functionality.
- 📋 Issue #1: Security Vulnerability Report - Detailed vulnerability analysis and reproduction steps
- 🔧 Pull Request #2: Security Fixes - Comprehensive security implementation and testing
The Problem: Any authenticated user can use any share code to access documents they don't own.
Real-World Scenario:
- Alice creates a share code intended for Bob
- Eve (an attacker) intercepts or guesses the share code
- Eve can access Alice's confidential document using Bob's intended share code
- The same share code can be reused multiple times
Security Classification:
# Start the vulnerable application docker compose up --build # Run the exploit demonstration ./exploit_demo.sh # View API documentation open http://localhost:8000/docs
The exploit_demo.sh script demonstrates the complete attack scenario where Eve successfully accesses Alice's document using Bob's intended share code.
All users have password password123:
- alice - Document owner (creates share codes)
- bob - Intended recipient
- eve - Unauthorized attacker
This repository demonstrates:
- How authorization bypass vulnerabilities occur in real applications
- The impact of insufficient access controls in document sharing systems
- Proper security implementation and testing practices
For detailed technical analysis, vulnerability reproduction steps, and comprehensive security fixes, see the linked issue and pull request above.
This application is intentionally vulnerable for educational purposes only.