Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[A8][Amarelo Designs] Fix the Insecure Deserialization vulnerability changing Pickle to JWT #422

Closed
wants to merge 2 commits into from

Conversation

secampos
Copy link

This solution refers to which of the apps?

A8 - Amarelo Designs

What did you do to mitigate the vulnerability?

The vulnerability was fixed changing the Pickle to JWT.

Copy link
Contributor

@gustavocovas gustavocovas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @secampos! Your implementation of JWT instead of Pickle-based tokens looks very good! 🐼 🚀

I just left a suggestion regarding a hardcoded admin password in the source code

"username":username,
"admin":True,
"sessionId":token,
"exp": datetime.datetime.utcnow() + datetime.timedelta(seconds=600)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good!

@@ -19,11 +22,20 @@ def login():

if username == "admin" and password == "admin":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about chaning this default password here? Using an environment variable as you did with JWT_SECRET_KEY would be great

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @gustavocovas. Now the application is getting the user's credentials from the environment variables.

Copy link
Contributor

@gustavocovas gustavocovas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, @secampos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A8-OWASP-2017 Amarelo Designs mitigation solution 🔒 This is a possible way to fix this vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants