CVE-2024-47056 — core
MEDIUMCVE-2024-47056 is a medium-severity (CVSS 5.1) CWE-312 vulnerability in mautic/core. A fix is available for mautic/core — see the affected versions and patch details below.
Mautic does not shield .env files from web traffic
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-47056.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
mautic/core🐘mautic/core🐘mautic/coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | mautic/core | ≥ 4.4.0&&< 4.4.16 | 4.4.16composer require mautic/core:^4.4.16 |
| 🐘Packagist | mautic/core | ≥ 5.0.0-alpha&&< 5.2.6 | 5.2.6composer require mautic/core:^5.2.6 |
| 🐘Packagist | mautic/core | ≥ 6.0.0-alpha&&< 6.0.2 | 6.0.2composer require mautic/core:^6.0.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mautic/core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update mautic/core to 4.4.16 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-47056 is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
Frequently Asked Questions
Is CVE-2024-47056 in your dependencies?
Find it across Packagist, including transitive dependencies.