Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django SECRET_KEY risks [closed]

Tags:

python

django

In terms of security, what could an attacker do if he knows the SECRET_KEY? Is there any imminent danger?

like image 419
Michael Avatar asked Nov 04 '12 19:11

Michael


1 Answers

Well, from the manual:

Running Django with a known SECRET_KEY defeats many of Django's security protections, and can lead to privilege escalation and remote code execution vulnerabilities.

I'm not sure how it could do those things (i.e. exactly how the secret key is used). Most likely it could lead to identity verification issues. If Django is actually using it to somehow provide https transport, then anyone able to sniff traffic could decrypt the traffic.

like image 161
CrazyCasta Avatar answered Nov 15 '22 06:11

CrazyCasta