CVE-2024-47056: Mautic Core Sensitive .env File Exposure Vulnerability
Summary
CVE-2024-47056: Mautic does not shield .env files from web traffic. Affects mautic/core across 3 version ranges.
>= 4.4.0, < 4.4.16
>= 5.0.0-alpha, < 5.2.6
>= 6.0.0-alpha, < 6.0.2
Fixed in 4.4.16, 5.2.6 or 6.0.2, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Mautic is an open-source marketing automation platform that enables businesses to manage their marketing campaigns and customer relationships effectively. It provides features such as email marketing, social media integration, and lead management. However, Mautic's reliance on configuration files, particularly the .env file, can expose sensitive information if not properly secured. This vulnerability arises from inadequate web server configurations that allow direct access to these files.
Vulnerability Detail
This vulnerability allows unauthorized access to sensitive .env configuration files through a web browser. The .env file typically contains critical information such as database credentials and API keys. Due to missing restrictions in web server configurations, an attacker can easily access this file by navigating to its URL, leading to potential data breaches and unauthorized access to the application.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 4.4.0, < 4.4.164.4.16composer require mautic/core:4.4.16 -
>= 5.0.0-alpha, < 5.2.65.2.6composer require mautic/core:5.2.6 -
>= 6.0.0-alpha, < 6.0.26.0.2composer require mautic/core:6.0.2
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
For Apache users, ensure your web server respects .htaccess files. For Nginx users, add the following configuration block to your Nginx server configuration to deny access to .env files:
location ~ \.env {
deny all;
}
Conclusion
The CVE-2024-47056 vulnerability in Mautic poses a significant risk by exposing sensitive configuration files to unauthorized access. It is crucial for users to update to the latest versions and implement proper web server configurations to mitigate this risk.
See every vulnerability recorded for mautic/core →
FAQ
The vulnerability can lead to the exposure of sensitive information such as database credentials and API keys, potentially compromising the security of the application.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The affected versions of Mautic are those prior to 4.4.16, 5.2.6, and 6.0.2.
The CVSS score of this vulnerability is 5.1, indicating a moderate severity level.
If immediate updating is not possible, implement the recommended workarounds to restrict access to the .env file until you can apply the patch.
References
Related vulnerabilities
Recent vulnerabilities recorded for mautic/core.