CVE-2021-3142 — core
Fix: mautic/mautic@ba31db2CVE-2021-3142 is a security vulnerability in mautic/core. A fix is available for mautic/core — see the affected versions and patch details below.
XSS in Mautic
Real-World Exposure
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
Impact
This is a cross-site scripting vulnerability relating to creating/editing a company which requires the user to be logged in as an administrator to be executed.
This vulnerability was reported by Dardan Prebreza at Bishop Fox.
Patches
Upgrade to 3.2.4 or 2.16.5.
Link to patch for 2.x versions: https://github.com/mautic/mautic/compare/2.16.4...2.16.5.diff
Link to patch for 3.x versions: https://github.com/mautic/mautic/compare/3.2.2...3.2.4.diff
Workarounds
None
References
https://www.mautic.org/blog/community/security-release-all-versions-mautic-prior-2-16-5-and-3-2-4
For more information
If you have any questions or comments about this advisory:
- Post in https://forum.mautic.org/c/support
- Email us at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | mautic/core | ≥ 3.0.0&&< 3.2.4 | 3.2.4composer require mautic/core:^3.2.4 |
| 🐘Packagist | mautic/core | ≥ 2.0.0&&< 2.16.5 | 2.16.5composer require mautic/core:^2.16.5 |
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 3.2.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-3142 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2021-3142 in your dependencies?
Find it across Packagist, including transitive dependencies.