Safeguard
Vulnerability Analysis•

CVE-2021-27916: High Arbitrary File Deletion in Mautic GrapesJS

CVE-2021-27916 lets any logged-in Mautic user delete files outside the media folders through the GrapesJS builder. Update to 4.4.12 or 5.0.4.

Safeguard Security Team
3 min read

CVE-2021-27916 is a high severity (CVSS 8.1) relative path traversal in the GrapesJS builder of Mautic. Any logged in user, whatever their access level, could delete files outside the media folders. The advisory lists versions from 3.3.0 as affected and 4.4.12 or 5.0.4 as patched.

What's affected

  • Mautic (Composer package mautic), versions 3.3.0 and later until the patched releases, per GitHub advisory GHSA-9fcx-cv56-w58p.
  • Patched in 4.4.12 and 5.0.4. The advisory lists no workaround.
  • The advisory was published on 11 April 2024 and rates it High.
  • The record gives integrity and availability impact as high and confidentiality as none.
  • KEV status: false.

How to check if you're exposed

Check the Mautic version in the interface or with Composer.

composer show mautic/mautic

If the version is 3.3.0 or newer and below the patched release for your line (4.4.12 or 5.0.4), it is affected. Also confirm which users have accounts, since any role can reach the issue.

What to do now

  1. Update to 4.4.12 or 5.0.4, depending on your release line.
  2. Take a full file backup before and after the update, because the flaw is about deleting files.
  3. Review Mautic accounts and disable any that are unused or shared.
  4. Run the application with a file system account that cannot write outside the directories it needs.
  5. Check that your deployment can be restored quickly from a clean build if system files are missing.
  6. Treat any report of missing files or odd behavior after exposure as a possible incident, and compare the application directory against a clean copy of the same release.
  7. Put the fix in your regular patch cycle for other web applications as well. Path traversal bugs appear in many products, and reviewing file permissions once is cheap.

Why it matters

The class is CWE-22, path traversal. A file name sent to the builder was not restricted to the media folders, so a path with directory climbing elements could point at system files, libraries or other important files. The record says this applied whatever the user access level.

Deleting a library or a configuration file can break an application or alter its behavior in ways that are hard to predict. The defense is to patch, and also to run web applications with the minimum file permissions, so a flaw like this has limited reach.

Quick check

Which versions fix it?

Mautic 4.4.12 and 5.0.4, per the GitHub advisory.

Does a low privilege account matter?

The advisory says the level of access did not matter. Any logged in user could reach it.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

We email you a link to confirm, and only then add you to the list. Unsubscribe in one click. Privacy

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.