Analysis and Mitigation of Common Web Application Vulnerabilities: A Dual-Mode Educational Framework
Web applications underpin domains such as banking, healthcare, education, and e-commerce, which makes web security a persistent concern. Many exploitable weaknesses stem from routine coding oversights such as missing input validation and absent authorization checks. This paper presents a Flask-based educational framework that implements each vulnerability class in two parallel forms: a deliberately vulnerable build and a hardened build. The framework demonstrates SQL Injection (SQLi), Cross-Site Scripting (XSS), Insecure Direct Object Reference (IDOR), Broken Access Control, Insecure File Upload, OS Command Injection, and Server-Side Request Forgery (SSRF). A session-based unified interface toggle allows the user to switch between vulnerable and secure modes at runtime, and a custom logging subsystem feeds an analytics dashboard that visualizes attack attempts in real time using a Chart.js pie chart. The secure build applies parameterized queries, bcrypt password hashing, CSRF protection, output encoding, role-based access control (RBAC), file-upload validation, argument-list process execution via subprocess.run(), and IP blacklisting for outbound requests. Identical attack attempts were executed against both builds to compare outcomes. The results indicate that a small set of disciplined secure-coding practices neutralizes the demonstrated attack classes.
Authors
- Arham Bothra
Publication Details
- Journal
- Figshare
- Published
- 2026-11-17
- DOI
- https://doi.org/10.6084/m9.figshare.35039200
- Primary Topic
- Web Application Security Vulnerabilities
- Type
- preprint