django-tenants 3.4.8 before 4.0.1 SQL Injection via Unescaped Schema Name
- State
- Published
- Severity
- 8.7 High
- Published
- Nov 16, 2026
- Updated
- Nov 17, 2026
- Reserved
- Nov 16, 2026
Description
django-tenants 3.4.8 before 4.0.1 contains an SQL injection vulnerability in its PostgreSQL backend that allows attackers to inject SQL through unescaped tenant schema names. Attackers who can choose or influence a schema name can supply quote characters that are interpolated into SET search_path and CREATE, DROP or ALTER SCHEMA statements, letting them read other tenants' data or run SQL as the application's database user.
| Product | Versions |
|---|---|
| django-tenants django-tenants | 3.4.8 to before 4.0.1 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 8.7 High | VulnCheck | |
| 3.1 | 8.8 High | VulnCheck |
Weaknesses
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
References
- GitHub Security Advisory (GHSA-693j-7v9f-x7pw)Vendor Advisory
- https://github.com/django-tenants/django-tenants/commit/46d89c0fccc820f88657e6ec152ba855072571ffPatch
- django-tenants v4.0.1 Release NotesRelease Notes
- https://github.com/django-tenants/django-tenants/blob/v4.0.0/django_tenants/postgresql_backend/base.py#L208-L213Technical Details
- https://github.com/django-tenants/django-tenants/blob/v4.0.0/django_tenants/postgresql_backend/base.py#L46Technical Details
- VulnCheck Advisory: django-tenants 3.4.8 before 4.0.1 SQL Injection via Unescaped Schema NameThird-Party Advisory
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.