Skip to content

Conversation

@RayTdC
Copy link
Collaborator

@RayTdC RayTdC commented Jun 12, 2024

This solution refers to which of the apps?

A9 - Games Irados

What did you do to mitigate the vulnerability?

The app presented a log without objectivity, with shallow information when informing about coupons or when logging in. To change this situation, more detailed information was added, such as who made the request and what happened, so it will be clearer to discover possible attacks, based on the log description.

Captura de Tela 2024-06-12 às 01 56 04

Note: The “id do usuário” field was used because the user name would be sensitive information exposed in the log. The information that is covered is the device's IP.

database = DataBase(dbEndpoint, dbUser, dbPassword, dbName)
init_db(database)
app.run(host='0.0.0.0',port=10010, debug=True)
app.run(host='0.0.0.0', port=10010, debug=True)

Check failure

Code scanning / CodeQL

Flask app is run in debug mode

A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.
@kevinwall
Copy link

Hey there, @RayTdC!

I checked your solution, and it seems that you successfully resolved the issue with the logs. However, you forgot to remove the flag that boots Flask in debug mode. Please do so, and then I can approve your request.

Also, a little tip: for the field "id do usuário," you can censor the username. For example, you can change kevinwall to k*******l. This way, it still conveys information without revealing the actual username.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants