Skip to content

Arbitrary comment delete

High
DogukanUrker published GHSA-6hp9-jv2f-88wr Aug 19, 2025

Package

flaskBlog (python)

Affected versions

<= 2.8.0

Patched versions

None

Description

Disclaimer

This advisor is referred to my other security advisor, where GitHub asked for separate posts in order to get CVE IDs.

Arbitrary comment delete

Description

When deleting a comment, there's no validation of the ownership of the comment. Every user can delete an arbitrary comment of another user on every post, by simply intercepting the delete request and changing the commentID.
The code that causes the problem is in routes/post.py, line 77:

if "commentDeleteButton" in request.form:
    Delete.comment(request.form["commentID"])

PoC

image
In the image above, the commentID requested for deletion is NOT owned by the user that made the request.

Solution

Before deleting a comment, check if the user that is making the request owns the comment referred by commentID.

Severity

High

CVE ID

CVE-2025-55737

Weaknesses

Authorization Bypass Through User-Controlled Key

The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. Learn more on MITRE.

Credits