Skip to main content

DjangoCRM CVE-2026-71239

| EUVDEUVD-2026-53312 HIGH
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2026-08-05 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c GHSA-qwf5-72hq-pg7x
8.1
CVSS 3.1 · Vendor: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain DjangoCRM account with mass-mail edit rights
  2. Delivery
    Craft EmlMessage with DTL payload in subject or content
  3. Exploit
    Trigger preview or send via vulnerable render path
  4. Execution
    Django Template() executes injected template syntax
  5. Persist
    Resolve context objects (User ORM, request, CSRF token)
  6. Impact
    Exfiltrate password hashes or forge CSRF-protected actions

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
Exploitation Conditions

Exploitation requires an account authenticated to DjangoCRM that holds the specific 'mass-mail message edit rights' permission within the massmail module - this is not a default permission for all authenticated users and must be explicitly assigned. The attacker must be able to create or modify EmlMessage objects (subject or content fields) and trigger rendering through a preview operation or email send action in one of the three affected code paths. The massmail module must be active in the DjangoCRM installation. Exploitation is strictly limited to users holding the mass-mail edit permission; unauthenticated users and authenticated users without this specific permission cannot reach the vulnerable code. The attack is platform-agnostic but requires a live DjangoCRM web instance. The CVSS vector PR:L confirms low-privilege authenticated access is the minimum bar - not PR:N - which is the primary limiting factor for attack surface exposure.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N scores 8.1, which accurately reflects the network-accessible attack surface, low complexity, and dual high-impact outcomes. PR:L correctly captures the gating condition: exploitation requires an authenticated account with mass-mail edit rights, which is not the default for all users, partially mitigating real-world risk in well-administered deployments. The S:U (unchanged scope) rating is consistent with Django's DTL model, which does not grant arbitrary OS-level code execution by default, bounding the blast radius to the application tier. EPSS data is absent from the available intelligence, making exploitation probability quantification impossible. No CISA KEV listing is present and no POC exploit code has been identified, distinguishing this from actively exploited SSTI variants. The most operationally severe impacts are the password hash disclosure (enabling offline cracking) and CSRF token exfiltration (enabling authenticated action forgery against other users). Real-world priority is high for organizations where DjangoCRM mass-mail edit rights are delegated to non-administrative or semi-trusted users; lower in tightly controlled deployments where only system administrators hold that permission.

Exploit ScenarioDerived

An attacker authenticated to DjangoCRM with mass-mail edit rights creates an EmlMessage with a subject field containing a payload such as {% for u in request.user.__class__.objects.all %}{{ u.username }}:{{ u.password }},{% endfor %}. When the application renders a message preview via message_previews.py or processes the message through email_creators.py, Django's Template() instantiates the attacker's string as a live template and resolves all User ORM objects in context, returning a comma-separated list of usernames and password hashes in the rendered output. No public POC has been identified, but the SSTI technique against Django's Template() class is well-documented in open security research.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 05, 2026

Server-side template injection in DjangoCRM's massmail module allows authenticated users with mass-mail edit rights to execute arbitrary Django Template Language expressions by injecting syntax into EmlMessage subject and content fields, which are passed unsanitized to Django's Template() constructor across three separate code locations. Successful exploitation can disclose other users' account data and password hashes from Django request context variables, exfiltrate CSRF tokens enabling cross-site request forgery, and include arbitrary registered templates. No KEV listing or public exploit code has been identified at time of analysis, but the low attack complexity and high-confidence CVSS 8.1 rating indicate meaningful risk for deployments where mass-mail edit rights are granted to non-administrator users.

RemediationAI

The primary fix requires eliminating the pattern of passing user-supplied EmlMessage fields directly into Django's Template() constructor across all three affected files. The correct approach is to render subject and content fields as plain text using Django's built-in escaping mechanisms (e.g., django.utils.html.escape() or format_html()), never treating user input as a template source string. Until a patched release is available - no exact fix version has been confirmed from the available references - the most effective compensating control is to restrict the mass-mail message edit permission exclusively to trusted administrators via Django's permission system, ensuring untrusted authenticated users cannot supply EmlMessage fields. Monitor the upstream repository at https://github.com/DjangoCRM/django-crm for a fix commit or tagged release. If mass-mail functionality is non-essential, disabling the massmail module entirely eliminates the attack surface with no side effects beyond loss of bulk-mail capability. Do not rely on input validation of subject/content fields alone, as Django template injection bypasses can be subtle and validation-rule evasion is well-documented.

Affected VersionsENISA

django-crm 0

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Django's Template() class, when instantiated with attacker-controlled input, evaluates Django Template Language (DTL) expressions - variable resolution ({{ }}) and tag execution ({% %}) - against the full render context at the time of instantiation. Unlike Jinja2, DTL does not expose arbitrary Python builtins or exec() by default, but it does resolve all objects in the render context including the request object, session state, and ORM-accessible model instances such as User objects and their password hash fields. CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) precisely describes the root cause: the application fails to distinguish user-supplied data from template code. The vulnerability is systemic, appearing independently in message_previews.py (f-string embedding message.subject/message.content into Template()), email_creators.py (eml_message.subject passed directly as a template string), and helpers.py (same f-string pattern), indicating the insecure pattern was replicated across the codebase rather than isolated to a single oversight. The affected repository is https://github.com/DjangoCRM/django-crm.

Know when Ssti gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c) PRIMARY 8.1 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 8.1 HIGH

PR:L reflects required mass-mail edit permission; C:H and I:H capture password hash disclosure and CSRF forgery; S:U because DTL execution stays within application tier; A:N as no availability impact is described.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c).

CVSS VectorVendor: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

DescriptionCVE.org

DjangoCRM's massmail module renders user-controlled EmlMessage fields (subject, content) through Django's Template() constructor with no sanitization, in at least three locations: message_previews.py builds an f-string embedding message.subject/message.content directly into a Template() call; email_creators.py passes eml_message.subject directly as a template string to Template(); and helpers.py contains the same f-string interpolation pattern. An authenticated user with mass-mail message edit rights can inject Django template syntax ({{ }} / {% %}) that executes at render time, enabling disclosure of other users' data and password hashes via request context variables, CSRF token forgery, and inclusion of arbitrary registered templates.

Executive ViewAI

Why It Matters

A server-side template injection vulnerability in DjangoCRM's mass-mail module allows authenticated users with mass-mail edit privileges to steal password hashes, account credentials, and session tokens, enabling account compromise and data breach. Organizations permitting non-administrative staff to manage mass-mail communications face immediate risk of credential theft and unauthorized account access.

Business Impact: Severe
Compensating Controls

Restrict mass-mail edit permissions to administrators only; implement server-side input validation on subject and content fields to reject Django template delimiters and keywords; deploy WAF rules targeting template injection attack patterns; enable comprehensive logging of template processing errors and unauthorized database access attempts; disable the mass-mail module entirely if operationally feasible until vendor-released patch becomes available.

Threat Intelligence Overview

EPSS Score
0.2%
Top 86% exploitable
Prevalence
Low
niche open-source Django CRM, limited enterprise footprint
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

More in Ssti

View all
CVE-2024-23692 CRITICAL POC
9.8 May 31

Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. Rated c

CVE-2025-47916 CRITICAL POC
10.0 May 16

Invision Community 5.0.0 through 5.0.6 contains an unauthenticated remote code execution vulnerability in the template e

CVE-2024-6386 CRITICAL POC
9.9 Aug 21

Remote code execution in the WPML WordPress multilingual plugin (versions up to and including 4.6.12) allows Contributor

CVE-2026-75650 CRITICAL POC
10.0 Sep 07

Server-side template injection in Adobe Commerce, Adobe Commerce B2B, and Magento Open Source allows remote unauthentica

CVE-2026-39980 CRITICAL POC
9.1 Apr 09

Server-Side Template Injection in OpenCTI notifier templates allows privileged administrators with 'Manage customization

CVE-2026-97359 CRITICAL POC
10.0 Sep 24

Unauthenticated remote code execution in Rejetto HFS2 (HTTP File Server) through version 2.4.0 lets an attacker execute

CVE-2025-23211 CRITICAL POC
9.9 Jan 28

Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve

CVE-2024-32651 CRITICAL POC
10.0 Apr 26

changedetection.io is an open source web page change detection, website watcher, restock monitor and notification servic

CVE-2024-4040 CRITICAL POC
10.0 Apr 22

A server side template injection vulnerability in CrushFTP in all versions before 10.7.1 and 11.1.0 on all platforms all

CVE-2026-15734 CRITICAL POC
9.8 Aug 06

Remote code execution in WGDashboard 4.3.2 and earlier lets authenticated attackers inject Server-Side Template Injectio

CVE-2024-24724 CRITICAL POC
9.8 Apr 03

Gibbon through 26.0.00 allows /modules/School%20Admin/messengerSettings.php Server Side Template Injection leading to Re

CVE-2026-77136 CRITICAL POC
9.5 Aug 25

Server-side template injection in the TYPO3 'Powermail' extension lets an anonymous user submit Fluid template syntax th

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy