flask-unsign
Flask Unsign is a penetration testing utility that attempts to uncover a Flask server's secret key by taking a signed session verifying it against a wordlist of commonly used and publicly known secret keys (sourced from books, GitHub, StackOverflow and various other sources).
What it is and what it does
Flask-Unsign is a penetration testing utility designed to test Flask application security by attempting to recover or forge session cookies. It decodes Flask's signed (but not encrypted) session data, brute-forces the server's secret key against wordlists of common keys, and can craft new session cookies once a key is found. The tool operates as a command-line utility and depends on Flask, itsdangerous, and related web framework libraries.
The package is intended for authorized security testing and development environments. It reads session cookies from HTTP responses or accepts them directly, then attempts to match the signature against a wordlist of known or guessed secret keys. Once a match is found, you can generate new signed session data with arbitrary content. The tool includes options for handling older itsdangerous versions (--legacy flag) and custom wordlist formats.
Use it for:
- Test your own Flask application's session security by attempting to recover the secret key with common wordlists.
- Decode and inspect Flask session data during development and debugging without knowing the secret key.
- Authorized penetration testing to verify whether a Flask server uses weak or publicly known secret keys.
- Forge custom session cookies to test authorization logic and access control in Flask applications.
- Verify that session management is properly implemented before deploying a Flask application to production.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Command-line tool to decode, brute-force, and forge Flask session cookies by attempting to guess or verify the server's secret key against wordlists.
Yes, if you are conducting authorized security testing or developing Flask applications and need to verify session security. The low install friction and permissive license make it accessible. However, maintenance is dormant (last release 619 days ago), so expect no active support; use it for one-off testing rather than as a dependency in production code. Not suitable for general-purpose use outside security testing contexts.
Install
flask-unsign on PyPI
pip
pip install flask-unsignuv
uv add flask-unsignpoetry
poetry add flask-unsignInstalling flask-unsign
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant—last release was 619 days ago, though the repository remains active with a recent commit on 2024-12-03. Suitable for one-off testing but not for ongoing development.
License in practice
MIT license is permissive; you can use, modify, and distribute this tool freely in commercial and private projects with minimal restrictions, provided you retain the license notice.
Quickstart
pip install flask-unsign
flask-unsign --decode --cookie 'eyJsb2dnZWRfaW4iOmZhbHNlfQ.XDuWxQ.E2Pyb6x3w-NODuflHoGnZOEpbH8'
flask-unsign --unsign --cookie < cookie.txt
Requires Python 3.6 or later. Wordlist-based brute-forcing requires a newline-delimited wordlist file or the optional [wordlist] extra.
Verify before relying
- Whether the tool works reliably against modern Flask/itsdangerous versions without the --legacy flag.
- Performance characteristics when brute-forcing against large wordlists on typical hardware.
- Compatibility with Flask applications using custom session serialization or signing algorithms.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — flask, requests, itsdangerous, markupsafe, werkzeug |
| Maintenance | dormant — 619 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 101,208/month — #12,955 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flask_unsign-1.2.1-py3-none-any.whl
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
dicewarediceware generates memorable passphrases by…
copyleft · top 5,000 on PyPI
pycookiecheatExtracts and decrypts cookies from Chrome,…
permissive · top 15,000 on PyPI
cookiesParses and renders HTTP Cookie and Set-Cookie…
permissive · top 15,000 on PyPI
browser-cookie3Extracts cookies from your browser's local…
copyleft · top 5,000 on PyPI
flask-talismanFlask extension that automatically sets HTTP…
permissive · top 5,000 on PyPI
Flask-ParanoidFlask-Paranoid detects and blocks session…
permissive · top 15,000 on PyPI
myjwtA command-line tool for testing and…
permissive · top 15,000 on PyPI
fetch-useRoutes HTTP requests through Browser-Use's…
permissive · top 5,000 on PyPI
streamlit-cookies-controllerProvides read, write, and delete operations on…
permissive · top 15,000 on PyPI
uncurlConverts curl command-line requests into…
unclear · top 15,000 on PyPI