CWE-312Weakness · CWE-312

CVE-2024-47056

MEDIUM · 5.1 CVSS v3.1 Published 2025-05-28
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
56/100
Remediation priority · Elevated
No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
SummaryThis advisory addresses a security vulnerability in Mautic where sensitive .env configuration files may be directly accessible via a web browser. This exposure could lead to the disclosure of sensitive information, including database credentials, API keys, and other critical system configurations. Sensitive Information Disclosure via .env File Exposure: The .env file, which typically contains environment variables and sensitive application configurations, is directly accessible via a web browser due to missing web server configurations that restrict access to such files. This allows an unauthenticated attacker to view the contents of this file by simply navigating to its URL. MitigationUpdate Mautic to the latest Mautic version. By default, Mautic does not use .env files for production data. For Apache users: Ensure your web server is configured to respect .htaccess files. For Nginx users: As Nginx does not inherently support .htaccess files, you must manually add a configuration block to your Nginx server configuration to deny access to .env files. Add the following to your Nginx configuration for the Mautic site: location ~ /\.env { deny all; } After modifying your Nginx configuration, remember to reload or restart your Nginx service for the changes to take effect.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Mautic exposes sensitive .env configuration files directly via web browser due to missing web server access restrictions. An unauthenticated attacker can navigate to the .env file URL and view database credentials, API keys, and other critical system configurations.

MitigationDeny web access to .env files via web server configuration (Apache .htaccess or Nginx location block) and update Mautic to the latest version.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
Low

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Verify .env file exists in web root
    Check the document root of the Mautic installation for the presence of a .env file (e.g., /var/www/html/mautic/.env or similar web root path)
    Affected if The .env file exists in a location that is served by the web server
  2. Test .env file accessibility via HTTP
    Use curl, wget, or a browser to request http(s)://<your-mautic-domain>/.env and check if the file contents are returned
    Affected if The request returns the actual .env file contents instead of a 403 Forbidden or 404 Not Found error
  3. Check Apache .htaccess protection for .env
    Inspect the .htaccess file in the Mautic web root for directives that block access to .env files (look for rules like 'RewriteRule ^\.env' or '<FilesMatch "\.env$">')
    Affected if No blocking directives exist or the .htaccess file does not restrict .env file access
  4. Check Nginx configuration for .env access
    Review Nginx site configuration files (typically in /etc/nginx/sites-available/) for location blocks that deny access to .env files (e.g., 'location ~ /\.env { deny all; }')
    Affected if No Nginx location block exists to deny access to .env files or the directive is missing

If the .env file is accessible via direct HTTP request and the web server has no configuration blocking access, the environment is affected by this vulnerability.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Deny web access to .env files via web server configuration (Apache .htaccess or Nginx location block) and update Mautic to the latest version.

Recommended fix Moderate confidence
  1. For Apache users: Ensure your web server is configured to respect .htaccess files, which already contain directives to deny access to .env files
  2. For Nginx users: Add the following configuration block to your Nginx server configuration for the Mautic site: location ~ /\.env { deny all; }
  3. After modifying your Nginx configuration, reload or restart the Nginx service for the changes to take effect
  4. As an additional precaution, verify that the .env file is not accessible by attempting to access it via a web browser

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing2.0 h
  • Review / QA1.0 h
6.0 hours of engineering $1,060
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,696.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-47056 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-47056 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data