Skip to content

About

Educational FastAPI application demonstrating CWE-863 authorization bypass vulnerability in document sharing with comprehensive security fixes

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Share Code Authorization Vulnerability

A vulnerable FastAPI application demonstrating CWE-863: Incorrect Authorization in document sharing functionality.

🔗 Key Links

🚨 Vulnerability Summary

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:

🎯 Quick Demonstration

# 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.

👥 Test Users

All users have password password123:

  • alice - Document owner (creates share codes)
  • bob - Intended recipient
  • eve - Unauthorized attacker

📚 Educational Purpose

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.

About

Educational FastAPI application demonstrating CWE-863 authorization bypass vulnerability in document sharing with comprehensive security fixes

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages