Skip to content

Security

TheTerms is designed with security as a core concern:

LayerImplementation
AuthenticationNextAuth v5 with JWT sessions
AuthorizationtRPC middleware chain (enforceAuthrequireRole) with four-tier role hierarchy
SecretsEnvironment variables only — never stored in source code
DatabasePrisma ORM with parameterized queries — no raw SQL, no SQL injection
Signing tokensCryptographically random UUIDs via crypto.randomUUID()
Password hashingbcrypt with default cost factor
Password resetJWT-based tokens with 30-minute expiry and single-use revocation

Only the latest release on the main branch receives security patches. We recommend always running the most recent version.

Email security@theterms.app with the subject line:

[SECURITY] Brief description of the vulnerability

Include:

  • Description of the vulnerability
  • Steps to reproduce the issue
  • Potential impact (e.g., data exposure, privilege escalation)
  • Suggested fix (if you have one)
StageTimeline
AcknowledgmentWithin 72 hours
AssessmentWithin 7 days
Resolution (critical)Within 14 days
Resolution (moderate)Within 30 days

We ask that you allow reasonable time to address the vulnerability before public disclosure. We will credit reporters (with permission) in our release notes.

  • Authentication bypass or privilege escalation
  • Injection attacks (SQL, XSS, CSRF)
  • Secrets or credentials exposure
  • Data exfiltration or unauthorized data access
  • Cryptographic weaknesses in signing tokens
  • Server-side request forgery (SSRF)
  • Denial of service via resource exhaustion
  • Issues requiring physical access to the server
  • Social engineering attacks
  • Vulnerabilities in third-party dependencies (report those to the upstream project)
  • Issues in development-only configurations