Description

Detects messages sent from a user to themselves containing a fake PDF icon from Google's CDN, claiming to have an attachment while only containing images, and including links that appear to be PDF files.

References

No references.

Sublime Security
Created Dec 12th, 2025 • Last updated Nov 13th, 2026
Source
type.inbound
// a pdf icon directly before a current-thread link ending in .pdf
and any(html.xpath(body.html,
                   '//a[preceding-sibling::*[1][self::img or .//img] or parent::*/preceding-sibling::*[1][self::img or .//img]]'
        ).nodes,
        any(.links,
            regex.icontains(.display_text, '[-_.\s]pdf$')
            and .href_url.url in map(body.current_thread.links, .href_url.url)
        )
        and any(html.xpath(.,
                           'preceding-sibling::*[1]/descendant-or-self::img/@src | parent::*/preceding-sibling::*[1]/descendant-or-self::img/@src'
                ).nodes,
                // an inline (cid) image
                any(attachments,
                    strings.iends_with(..raw,
                                       strings.concat("cid:", .content_id)
                    )
                )
                // or office's pdf file-icon (sometimes proxied by gmail)
                or strings.icontains(.raw, '/assets/mail/file-icon/png/pdf')
        )
)
// no real attachments, only images
and all(attachments, .file_type in $file_types_images)
// self sender
and (
  length(recipients.to) == 1
  and sender.email.email == recipients.to[0].email.email
)
MQL Rule Console
•Docs•Learning 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