Medium Severity

Attachment: ICS Link With Valueless Base64 Query Parameter

Description

Detects inbound emails containing ICS calendar attachments where embedded event links include a randomized 8-character base64 query parameter with no assigned value. The rule excludes messages from high-trust sender domains that pass DMARC authentication.

References

No references.

Sublime Security
Created Sep 3rd, 2026 • Last updated Sep 4th, 2026
Source
type.inbound
and any(attachments,
        (
          .file_type == "ics"
          or .file_extension == "ics"
          or .content_type in ("application/ics", "text/calendar")
        )
        //
        // This rule makes use of a beta feature and is subject to change without notice
        // using the beta feature in custom rules is not suggested until it has been formally released
        //
        and any(beta.file.parse_ics(.).events,
                any(.links,
                    (
                      .href_url.path == '/'
                      and regex.imatch(.href_url.query_params,
                                       '[A-Za-z0-9+/]{8}'
                      )
                      and length(.href_url.query_params_decoded) == 1
                      and all(flatten(values(.href_url.query_params_decoded)),
                              . == ''
                      )
                    )
                    or (
                      ml.link_analysis(.).effective_url.path == '/'
                      and regex.imatch(ml.link_analysis(.).effective_url.query_params,
                                       '[A-Za-z0-9+/]{8}'
                      )
                      and length(ml.link_analysis(.).effective_url.query_params_decoded
                      ) == 1
                      and all(flatten(values(ml.link_analysis(.).effective_url.query_params_decoded
                                      )
                              ),
                              . == ''
                      )
                    )
                )
        )
)
and not (
  sender.email.domain.root_domain in $high_trust_sender_root_domains
  and coalesce(headers.auth_summary.dmarc.pass, false)
)
MQL Rule Console
DocsLearning Labs

Playground

Test against your own EMLs or sample data.

Share

Post about this on your socials.

Get Started. Today.

Managed or self-managed. No MX changes.

Deploy and integrate a free Sublime instance in minutes.
Get Started