Maskena
Methodology and results

Detection Accuracy

We publish how we measure prompt injection detection and the results of the current engine, including the cases where it still fails. No detector catches every attack. These numbers are here to help you decide how to use Maskena in your workflow.

Measured on 2026-11-18 · engine heuristic-1.4.0 · depth standard (API default) · Versão em português

0.16%false positives on 1,929 passages of legitimate documentation
93.5%of attacks detected in the Portuguese dataset (400 attacks)
100%of files with a hidden instruction flagged (white, invisible or CSS-hidden text)

1. How we measure

MetricQuestion it answers
Detection (recall)Out of 100 attacks, how many were flagged.
PrecisionOut of 100 flags, how many were real attacks.
False positivesOut of 100 legitimate texts, how many were flagged by mistake.

2. Short texts and prompts

Each example is analyzed on its own, as a POST /api/v1/check request would be.

DatasetAttacksLegitimateDetection PrecisionFalse positives
ai-safety-brazil/prompt-injection-br-synthetic
CC BY 4.0 · revision 73e244d
400400 93.5%99.2% 0.8%
usezn/zn-prompt-injection-bench
CC BY 4.0 · revision 60b3a18
1491,088 100%98.7% 0.2%
jackhhao/jailbreak-classification
Apache 2.0 · revision 2f2ceeb
141259 85.1%100% 0%
drakkeng/outilsia-injections-prompt-multilingue
CC BY 4.0 · revision b5a2922
9391 83.9%90.7% 8.8%
yanismiraoui/prompt_injections
Apache 2.0 · revision bd55359
152n/a 80.3%100% n/a
Lakera/gandalf_ignore_instructions
MIT · revision 04737b6
112n/a 77.7%100% n/a
deepset/prompt-injections
Apache 2.0 · revision 4f61ecb
6056 40%100% 0%

"n/a": the dataset contains only attacks, so false positives cannot be measured on it.

3. False positives on legitimate text

1,929 passages of real documentation in Portuguese and English: software help pages (GNOME) and technical documentation (Python and conda). None contains an attack. 3 were flagged by mistake, a rate of 0.16%.

Legal, financial and HR documents use different vocabulary from this set. If your volume is high, we recommend measuring the false positive rate on a sample of your own documents before blocking automatically.

4. Attacks inside documents

The most common real-world case is not an isolated prompt: it is a malicious sentence in the middle of pages of legitimate text, often hidden. To measure this, we inserted attacks from the test sets into real documents of three sizes (about 600, 3,000 and 12,000 characters), at random positions, using different insertion methods. As a control, we inserted legitimate texts in the same way.

Insertion methodFile flaggedAttack identified Control false positives
Visible text (TXT)59.9%55.8% 0.8%
Visible text (HTML)60.3%55.8% 0%
Visible text (Word)60.3%55.5% 1.2%
Visible text (PDF)46.5%43.3% 0.4%
Markdown comment77.9%75% 4.2%
Hidden with CSS (display: none)100%75% 2.5%
White text in HTML100%75% 2.5%
Hidden text in Word100%75% 2.5%
Invisible text in PDF100%64.1% 2.5%

312 attacks and 240 control texts per insertion method, in 3 document sizes (4,968 analyses).

5. Known limitations

6. Recommendations

Found an attack that Maskena misses? Send it to contact@maskena.com. Reports are used to improve detection.