Skip to content
SQL injection Write-up Advanced

Deep Dive: Adversarial Analysis of CVE-2026–4776 Breaking Mauti

A recursive sanitisation routine in Mautic operated on copies of nested query data rather than the original, so an internal 'trusted' flag could survive sanitisation. An attacker could inject raw SQL formulas and extract database versions, admin password hashes and PII through error responses.

Vignesh P Follow

Published on medium.com

In security research, we often look for complex architectural flaws, but some of the most devastating vulnerabilities hide in the delta between language-level semantics and developer assumptions. CVE-2026–4776 is a textbook example of a High-Severity SQL Injection in Mautic that emerged from a subtle “Reference…

Vignesh P, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The recursive sanitiser iterated arrays by value, so nested groups were scrubbed on temporary copies and the original user-supplied data, including the internal trust flag, reached the database unchanged.

Impact

An authenticated user restricted to their own contacts could bypass authorisation and dump the whole database, including version information, bcrypt admin password hashes and PII, via error-based leakage.

What the attacker needed

An authenticated Mautic API user; ability to send nested filter expressions

The fix

The recursion was changed to operate on the original data by reference so flag removal propagates up the stack; the text states the issue is patched.

How it was found

  1. Send a nested filter expression that looks legitimate so the root-level security check passes.
  2. Place the malicious SQL formula with the internal flag set to true inside the nested group.
  3. The root level copies the nested group, the recursive call strips the flag from the copy only, and the original payload proceeds to the database.
  4. The database evaluates the injected formula and returns an error that leaks data in the HTTP 500 response.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Mautic lets users filter data through its API. It has a hidden marker that tells the database 'this part is safe, run it as raw SQL'. A cleaning function was supposed to remove that marker from anything a user sent, but because of how PHP loops over arrays it cleaned a copy instead of the real data, so the marker survived and the raw SQL ran.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More by Vignesh P

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.