Answers are grounded in this paper and cite their sources.
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.
No takes yet. Share an insight, caveat, or question.
Arham Bothra (2026) studied this question.
Synapse has enriched 8 closely related papers on similar clinical questions. Consider them for comparative context: