Prompt injection: Instructions to an AI in a calendar invite
Detects calendar invites whose summary or description addresses an AI (an assistant, a named model such as 'Gemini,', 'the user', 'previous instructions') where NLU finds a request and the prompt injection model agrees on the same field. Calendar assistants read the full event text. Excludes graymail from senders passing DMARC.
Sublime rule (View on GitHub)
1name: "Prompt injection: Instructions to an AI in a calendar invite"
2description: "Detects calendar invites whose summary or description addresses an AI (an assistant, a named model such as 'Gemini,', 'the user', 'previous instructions') where NLU finds a request and the prompt injection model agrees on the same field. Calendar assistants read the full event text. Excludes graymail from senders passing DMARC."
3type: "rule"
4severity: "low"
5source: |
6 type.inbound
7 //
8 // This rule makes use of a beta feature and is subject to change without notice
9 // using the beta feature in custom rules is not suggested until it has been formally released
10 //
11 and any(filter(attachments,
12 .content_type in ("text/calendar", "application/ics")
13 or .file_extension =~ "ics"
14 ),
15 any(file.explode(.),
16 any(.scan.ics.calendars,
17 any(.components,
18 any([.summary, .description],
19 regex.icontains(.,
20 '\b(?:assistant|llm|screener|summari[sz]er)s?\b|(?:^|[\n\[(>\x27\".:])\s*(?:hey\s+)?(?:chatgpt|gemini|copilot|claude)\s*[:,]|\b(?:ai|language)\s+models?\b|\bthe\s+user\b|\b(?:previous|prior)\s+instructions\b'
21 )
22 and any(ml.nlu_classifier(.).entities,
23 .name == "request"
24 )
25 and beta.prompt_injection_detection(.).detection == "injection"
26 and beta.prompt_injection_detection(.).confidence in (
27 "medium",
28 "high"
29 )
30 )
31 )
32 )
33 )
34 )
35
36 // graymail from authenticated senders... AI-product newsletters and webinars
37 and not coalesce(ml.attack_score_flash().verdict == "graymail"
38 and headers.auth_summary.dmarc.pass,
39 false
40 )
41tags:
42 - "Attack surface reduction"
43 - "Email prompt injection"
44attack_types:
45 - "BEC/Fraud"
46tactics_and_techniques:
47 - "Evasion"
48 - "Prompt injection"
49 - "Social engineering"
50detection_methods:
51 - "Content analysis"
52 - "File analysis"
53 - "Natural Language Understanding"
54 - "Sender analysis"
55id: "1b4f35e1-91eb-5d6d-8b20-38aff537a1c1"