Medium Severity

Self-impersonation: Sender matches recipient with bolded name and suspicious link

Description

Detects messages where the sender's email address matches the recipient's email address, with the sender's display name appearing in bold text and a suspicious 'Read the Message' link present in the body.

References

No references.

Sublime Security
Created Jun 16th, 2026 • Last updated Jun 16th, 2026
Source
type.inbound
// sender matches recipients
and (
  length(recipients.to) == 1
  and recipients.to[0].email.email == sender.email.email
)
// sender in current thread BOLD
and any(html.xpath(body.html, '//b').nodes,
        .display_text == sender.display_name
)
// we want the dashed html element to contain a link, and that link to include part of the subject (the subject is the org)
and any(html.xpath(body.html,
                   '//table//td[contains(@style, "border-style: dashed") and contains(@style, "border-width: 1pt")]//a[./b]'
        ).nodes,
        any(regex.extract(subject.base, '(?P<word>\w+)'),
            any(..links,
                strings.icontains(.href_url.url, ..named_groups["word"])
            )
        )
)
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