CVE-2024-47056: Mautic does not shield .env files from web traffic
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.
Published May 28, 2025
Affected packages
mautic/core
- Ecosystem
- Composer (PHP)
- Affected
- >= 4.4.0, < 4.4.16
- Fixed in
- 4.4.16
- Check
composer show mautic/core
mautic/core
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.0.0-alpha, < 5.2.6
- Fixed in
- 5.2.6
- Check
composer show mautic/core
mautic/core
- Ecosystem
- Composer (PHP)
- Affected
- >= 6.0.0-alpha, < 6.0.2
- Fixed in
- 6.0.2
- Check
composer show mautic/core
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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:
location ~ /\.env {
deny all;
}After modifying your Nginx configuration, remember to reload or restart your Nginx service for the changes to take effect.
Credited to r3ky, lenonleite, nick-vanpraet, patrykgruszka.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-4776
Mautic has SQL Injection in API Contact Filtering
high7.1No fixJul 2, 2026CVE-2026-9557
Mautic Focus component Vulnerable to SSRF
medium6.4No fixJul 2, 2026CVE-2026-9558
Mautic has Server-Side Template Injection (SSTI) in Theme Templates
critical9.9No fixJul 2, 2026CVE-2026-9559
Mautic vulnerable to Path Traversal via Campaign Import
critical9.9Jul 2, 2026CVE-2026-9808
Mautic has an Authorization Bypass in API v2 Endpoints
high7.1Jul 2, 2026CVE-2026-9809
Mautic has Stored Cross-Site Scripting (XSS) in Projects Component
high7.6Jul 2, 2026
