Security fixes are backported to the latest minor release series only.
| Version | Supported |
|---|---|
| 1.x (latest) | ✅ Active |
| < 1.0 | ❌ End of life |
Please do not open a public GitHub issue for security vulnerabilities.
If you discover a vulnerability in django-tokenforge, please report it responsibly so we can address it before it is publicly disclosed. Public disclosure without a prior coordinated fix puts all users at risk.
Option 1 — GitHub Private Security Advisory (preferred)
Use GitHub's built-in private vulnerability reporting. This creates an encrypted channel between you and the maintainers.
Option 2 — Email
Send a report to: security@your-org.example.com
Encrypt your message with our PGP key if the vulnerability is critical:
Key ID: (publish your PGP key fingerprint here)
Fingerprint: (publish your PGP key fingerprint here)
A useful security report includes:
- Affected component — which module, endpoint, or setting is involved
- Vulnerability type — e.g. token forgery, replay bypass, information disclosure, privilege escalation
- Impact — what an attacker could achieve, and under what conditions
- Steps to reproduce — a minimal proof of concept (code, curl commands, etc.)
- Suggested fix — if you have one (optional but appreciated)
- Your contact details — so we can credit you in the advisory
We aim to respond according to the severity of the issue:
| Severity | Initial response | Fix target |
|---|---|---|
| Critical (CVSS ≥ 9.0) | Within 24 hours | Within 7 days |
| High (CVSS 7.0–8.9) | Within 48 hours | Within 14 days |
| Medium (CVSS 4.0–6.9) | Within 5 business days | Within 30 days |
| Low (CVSS < 4.0) | Within 10 business days | Next minor release |
We will acknowledge your report, keep you updated on our progress, and credit you in the published advisory (unless you prefer to remain anonymous).
We follow coordinated disclosure:
- You report privately.
- We confirm the vulnerability and develop a fix.
- We release a patched version and publish a GitHub Security Advisory simultaneously.
- After the patched version has been available for a reasonable window (typically 7 days for critical issues, 30 days for others), you are free to publish your own writeup.
The following are in scope:
- Token forgery or signature bypass
- Refresh token replay bypass
- Exchange token origin-binding bypass
- Race conditions in token rotation that allow an attacker to obtain a valid token
- Authentication bypass via the
BearerTokenAuthenticationclass - Information disclosure from token payloads or error responses
- Denial-of-service vectors specific to TokenForge (e.g. Redis exhaustion via exchange token flooding)
The following are out of scope:
- Vulnerabilities in Django, DRF, or Redis themselves — report those to the respective projects
- Rate limiting bypasses that depend entirely on Django's throttling infrastructure
- Issues that require the attacker to already have access to the Django
SECRET_KEYorACCESS_TOKEN_SIGNING_KEY - Social engineering or phishing
Before deploying TokenForge in production, verify these settings:
-
ACCESS_TOKEN_SIGNING_KEYis a dedicated key — never reuseSECRET_KEY -
REFRESH_TOKEN_COOKIE_SECUREisTrue(HTTPS only) -
REFRESH_TOKEN_COOKIE_SAMESITEis"Lax"or"Strict"— never"None"without also settingSecure -
REQUIRE_XHR_HEADERisTrue -
REPLAY_DETECTION_ENABLEDisTrue -
RISK_EVENT_HANDLERis configured for security monitoring and alerting - Redis is reachable and not publicly accessible
-
NUM_PROXIESis set to the correct number of trusted proxy hops in front of the app -
FINGERPRINT_STRICT_ACCESS_TOKENisFalseunless all users have stable, fixed IPs - Periodic
cleanup_expired_tokens()task is scheduled to prevent unbounded table growth -
CORS_ALLOW_CREDENTIALS = TrueandCORS_ALLOW_HEADERSincludesauthorizationandx-requested-with - Cookie path is scoped to the refresh endpoint (
REFRESH_TOKEN_COOKIE_PATH) -
ACCESS_TOKEN_SIGNING_KEYis stored in a secrets manager — not in version control
None yet — this is the initial public release.