CVE-2024-47056: Mautic/core Mautic Does Not Shield .env Vulnerability

MODERATE
Advisory Identifier: GHSA-h2wg-v8wg-jhxh
CVSS 5.1
CWE-312 CWE-526
Published
Advisory Summary

CVE-2024-47056 is a MODERATE (CVSS 5.1) mautic does not shield .env vulnerability (CWE-312: Cleartext Storage of Sensitive Information) affecting Mautic/core libraries in the Packagist ecosystem. The issue involves mautic does not shield .env files from web traffic. Remediation is available by upgrading affected packages to version 4.4.16, 5.2.6, 6.0.2.

CVE-2024-47056 at a Glance

CVE Identifier CVE-2024-47056
GHSA Identifier GHSA-h2wg-v8wg-jhxh
Severity MODERATE
CVSS v3.1 Base Score 5.1
CWE Classification CWE-312: Cleartext Storage of Sensitive Information
Affected Product Mautic/core
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2024-47056

To remediate this vulnerability, upgrade all affected Mautic/core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mautic/core fixed: 4.4.16
Upgrade mautic/core to 4.4.16
mautic/core fixed: 5.2.6
Upgrade mautic/core to 5.2.6
mautic/core fixed: 6.0.2
Upgrade mautic/core to 6.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for mautic/core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-47056, inspect your project dependencies for Mautic/core:

inspect dependencies for mautic/core

Analyze the terminal output to locate any version of Mautic/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.16), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-312: Cleartext Storage of Sensitive Information, where the product stores sensitive information in cleartext within a resource that might be accessible to another control sphere. In Mautic/core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary This 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. ### Mitigation Update 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: ```nginx location ~ /\.env { deny all; } ``` After modifying your Nginx configuration, remember to reload or restart your Nginx service for the changes to take effect.

CVE-2024-47056 Affected Mautic/core Versions

3 component(s)
Fixed Versions:
4.4.165.2.66.0.2
Product / Package Ecosystem Affected Versions Fixed Version
mautic/core
Packagist
≥ 4.4.0
< 4.4.16
4.4.16
mautic/core
Packagist
≥ 5.0.0-alpha
< 5.2.6
5.2.6
mautic/core
Packagist
≥ 6.0.0-alpha
< 6.0.2
6.0.2

References

Frequently Asked Questions

What is CVE-2024-47056?
CVE-2024-47056 is a security vulnerability in Mautic/core involving Mautic does not shield .env files from web traffic under CWE-312: Cleartext Storage of Sensitive Information.
Which Mautic/core versions are affected?
Affected versions include releases prior to 4.4.16, 5.2.6, 6.0.2 across affected packages: mautic/core.
What version fixes CVE-2024-47056?
Upgrading to 4.4.16, 5.2.6, 6.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mautic/core affected?
Yes, mautic/core is affected in releases prior to 4.4.16, 5.2.6, 6.0.2. Upgrade your dependency to 4.4.16, 5.2.6, 6.0.2 or later.
What is the CVSS score of CVE-2024-47056?
CVE-2024-47056 has a CVSS v3.1 base score of 5.1 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L.
What CWE is associated with CVE-2024-47056?
CVE-2024-47056 is classified under CWE-312: Cleartext Storage of Sensitive Information (The product stores sensitive information in cleartext within a resource that might be accessible to another control sphere.).
How can I check Packagist dependencies for CVE-2024-47056?
Run the dependency tree command: 'inspect dependencies for mautic/core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h2wg-v8wg-jhxh",
  "modified" : "2025-05-28T20:07:50Z",
  "published" : "2025-05-28T17:38:38Z",
  "aliases" : [ "CVE-2024-47056" ],
  "summary" : "Mautic does not shield .env files from web traffic",
  "details" : "### Summary \nThis 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.\n\nSensitive 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.\n\n### Mitigation\nUpdate Mautic to the latest Mautic version.\nBy default, Mautic does not use `.env` files for production data.\n\n**For Apache users:** Ensure your web server is configured to respect `.htaccess` files.\n\n**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:\n\n```nginx\nlocation ~ /\\.env {\n    deny all;\n}\n```\n\nAfter modifying your Nginx configuration, remember to reload or restart your Nginx service for the changes to take effect.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mautic/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mautic/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-alpha"
      }, {
        "fixed" : "5.2.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mautic/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0-alpha"
      }, {
        "fixed" : "6.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mautic/mautic/security/advisories/GHSA-h2wg-v8wg-jhxh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47056"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mautic/mautic"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-312", "CWE-526" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-28T17:38:38Z",
    "nvd_published_at" : "2025-05-28T17:15:23Z"
  }
}