Miggo Logo

CVE-2024-47056:
Mautic does not shield .env files from web traffic

5.1

CVSS Score
3.1

Basic Information

EPSS Score
0.00582%
Published
5/28/2025
Updated
5/28/2025
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
mautic/corecomposer>= 4.4.0, < 4.4.164.4.16
mautic/corecomposer>= 5.0.0-alpha, < 5.2.65.2.6
mautic/corecomposer>= 6.0.0-alpha, < 6.0.26.0.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability (CVE-2024-47056 / GHSA-h2wg-v8wg-jhxh) describes a situation where sensitive .env configuration files in Mautic installations can be directly accessed via a web browser. This exposure is explicitly attributed to 'missing web server configurations that restrict access to such files,' rather than a flaw within Mautic's PHP application code.

Exploitation of this vulnerability involves a direct HTTP request to the .env file (e.g., GET /path/to/.env). If the web server (Apache or Nginx) is misconfigured, it will serve this file directly. In such a scenario, Mautic's PHP application code, and therefore its functions, might not even be invoked for this specific request. The web server would handle the request and serve the static file.

The mitigation steps provided involve updating web server configurations:

  • For Apache: Ensuring .htaccess files are respected (implying Mautic might ship with a protective .htaccess that needs to be active).
  • For Nginx: Adding a specific location block to deny access to .env files.

While Mautic itself is patched (versions 4.4.16, 5.2.6, 6.0.2 for mautic/core), these patches are likely to include:

  1. An updated default .htaccess file to provide protection for Apache users.
  2. Documentation updates or installation scripts that guide users on securing their Nginx configurations.
  3. Potentially, health checks or warnings within Mautic if it detects an accessible .env file (though such checking functions are not 'vulnerable' themselves but rather mitigations).

Without specific commit information detailing changes to PHP files that would indicate a flaw in application logic leading to this exposure, it's not possible to identify any 'vulnerable functions' within Mautic that would appear in a runtime profile during the exploitation of this specific file exposure vulnerability. The root cause is the server configuration, not a bug in a Mautic function that processes input or renders output in an insecure way related to the .env file's accessibility.

Therefore, no specific Mautic PHP functions are identified as being directly vulnerable or as processing malicious input in a way that causes this .env file exposure. The 'vulnerability' is the improper server setup allowing direct access to a sensitive file, and Mautic's patches likely aim to help administrators secure this setup by default or provide better guidance, rather than fixing a code-level bug in a PHP function that serves or exposes the file content through application logic. Runtime indicators during exploitation would primarily be web server access logs showing a direct request to the .env file, not necessarily a Mautic application stack trace related to the file's content being served via a Mautic function. If Mautic's front controller or static asset serving mechanism were incorrectly serving .env files, then functions related to that would be relevant, but the advisory points to direct server-level misconfiguration as the cause.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry T*is **visory ***r*ss*s * s**urity vuln*r**ility in M*uti* w**r* s*nsitiv* `.*nv` *on*i*ur*tion *il*s m*y ** *ir**tly ****ssi*l* vi* * w** *rows*r. T*is *xposur* *oul* l*** to t** *is*losur* o* s*nsitiv* in*orm*tion, in*lu*in* **t***s* *

Reasoning

T** vuln*r**ility (*V*-****-***** / **S*-**w*-v*w*-j*x*) **s*ri**s * situ*tion w**r* s*nsitiv* `.*nv` *on*i*ur*tion *il*s in M*uti* inst*ll*tions **n ** *ir**tly ****ss** vi* * w** *rows*r. T*is *xposur* is *xpli*itly *ttri*ut** to 'missin* w** s*rv*