Query Details
// https://msrc.microsoft.com/update-guide/en-US/advisory/CVE-2025-21298 let InboundRTF = EmailAttachmentInfo | where FileType == "rtf" | join EmailEvents on NetworkMessageId | where EmailDirection == "Inbound" and LatestDeliveryAction != "Blocked" | distinct FileName; let VulnerableEP = DeviceTvmSoftwareVulnerabilities | where CveId == "CVE-2025-21298" | distinct DeviceName; DeviceFileEvents | where ActionType == "FileCreated" and FileName endswith ".rtf" | where InitiatingProcessFileName == "outlook.exe" | where parse_json(AdditionalFields)["FileType"] == 'Rtf' | where FileName has_any(InboundRTF) and DeviceName has_any(VulnerableEP)
This KQL query is designed to identify potential security risks related to a specific vulnerability (CVE-2025-21298) involving RTF (Rich Text Format) files received via email. Here's a simplified breakdown of what the query does:
Identify Inbound RTF Attachments:
Identify Vulnerable Devices:
Detect Risky File Creation Events:
The overall goal of the query is to find instances where a potentially malicious RTF file, received via email, was created on a device that is vulnerable to a specific security threat.

Steven Lim
Released: January 20, 2025
Tables
Keywords
Operators