stasiekzon Stack Overflow • Recommends
On “Can Flask session data be altered by users (threat actors)?”
Although Flask session contents can be seen by anyone who knows how to decode base64, user can't simply modify its contents by setting desired values and puting them back base64-encoded in session because of integrity signature you can hear about at link to this video.
The signature itself is generated based on session contents and app secret which is visible only on server side. So the user won't be able to tamper with session's contents successfully because he doesn't know the key set in SECRET_KEY in application settings.
So answering your question: you can store such admin flag in session and it will not be a threat to security provided your secret key is random enough Flask session doc and not…