Description
DjangoCRM ships with its Django SECRET_KEY hardcoded directly in the committed webcrm/settings.py rather than read from an environment variable. Since this key is used for session signing, CSRF token generation, and password reset tokens, anyone who reads the public repository can forge valid session cookies (including for the superadmin account), forge CSRF tokens, and forge password reset tokens, achieving full account takeover. The repository also ships with DEBUG=True as the default, causing error pages to leak database credentials, email credentials, OAuth data, and internal file paths.
Published: 2026-08-05
Score: 9.1 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In DjangoCRM, the project includes a hard-coded Django SECRET_KEY inside webcrm/settings.py. This key is used for signing session cookies, generating CSRF tokens, and creating password reset tokens. Anyone who can read the public repository obtains the key and can fabricate valid session cookies for any user, forge CSRF tokens, and produce valid password reset links. The result is a full account takeover, allowing unrestricted access to the application. This flaw is a classic instance of CWE-798, manifesting with a CVSS base score of 9.1.

Affected Systems

All installations of DjangoCRM that rely on the default settings are affected, as the repository ships the SECRET_KEY hard-coded and sets DEBUG=True. The default configuration causes error pages to expose database credentials, email settings, OAuth data, and internal file paths. The vulnerability is therefore present in every copy of the repository that has not been modified to read the key from an environment variable or to disable debugging in production.

Risk and Exploitability

The risk is high: the CVSS score of 9.1 reflects severe impact and an easy exploitation path. Because the key is publicly visible, the attack does not require any system access and can be performed by any actor who can clone the repository. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, but the exposure of credentials and the ability to forge authentication tokens makes the potential for exploitation extremely likely. Administrators should treat this as an immediate security emergency.

Generated by OpenCVE AI on August 5, 2026 at 12:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update DjangoCRM to a version where the SECRET_KEY is removed from source code and read from an environment variable or a secure secrets manager.
  • Immediately set DEBUG to False in all production environments to prevent sensitive data leakage from error pages.
  • Regenerate the SECRET_KEY and rotate all database, email, OAuth, and other credentials; deploy the new key and update all instances.

Generated by OpenCVE AI on August 5, 2026 at 12:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

References
History

Wed, 05 Aug 2026 11:15:00 +0000

Type Values Removed Values Added
Description DjangoCRM ships with its Django SECRET_KEY hardcoded directly in the committed webcrm/settings.py rather than read from an environment variable. Since this key is used for session signing, CSRF token generation, and password reset tokens, anyone who reads the public repository can forge valid session cookies (including for the superadmin account), forge CSRF tokens, and forge password reset tokens, achieving full account takeover. The repository also ships with DEBUG=True as the default, causing error pages to leak database credentials, email credentials, OAuth data, and internal file paths.
Title DjangoCRM: Hardcoded Django SECRET_KEY Enables Session and CSRF Token Forgery
Weaknesses CWE-798
References
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-05T12:43:45.494Z

Reserved: 2026-08-05T10:53:53.175Z

Link: CVE-2026-71238

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-05T12:30:12Z

Weaknesses
  • CWE-798

    Use of Hard-coded Credentials