CVE-2026-130082django-tenants 3.4.8 before 4.0.1 SQL Injection via Unescaped Schema Name
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.
What to do
None of the Linux distributions or Windows releases we track list an affected package for this CVE. Check the vendor-reported products below.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
What the vendor says
As published in the CVE record by VulnCheck, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- django-tenants: affected: 3.4.8 to before 4.0.1; fixed in
4.0.1
Vendor advisories:
- https://github.com/django-tenants/django-tenants/security/advisories/GHSA-693j-7v9f-x7pw (vendor-advisory)
- https://github.com/django-tenants/django-tenants/commit/46d89c0fccc820f88657e6ec152ba8550… (patch)
- https://github.com/django-tenants/django-tenants/releases/tag/v4.0.1 (release-notes)
References
- https://github.com/django-tenants/django-tenants/security/advisories/GHSA-693j-7v9f-x7pw
- https://github.com/django-tenants/django-tenants/commit/46d89c0fccc820f88657e6ec152ba855072571ff
- https://github.com/django-tenants/django-tenants/releases/tag/v4.0.1
- https://github.com/django-tenants/django-tenants/blob/v4.0.0/django_tenants/postgresql_backend/base.py#L208-L213
- https://github.com/django-tenants/django-tenants/blob/v4.0.0/django_tenants/postgresql_backend/base.py#L46
- https://www.vulncheck.com/advisories/django-tenants-3.4.8-before-4.0.1-sql-injection-via-unescaped-schema-name
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.