SVGs with JavaScript are bypassing traditional email security: Learn how to stay secure 

Executive summary: Hackers are hiding JavaScript inside SVG attachments that pass as harmless images, and slipping past Secure Email Gateways (SEGs). To stay secure, organizations need to enforce a DMARC policy of p=reject, easily implemented with Red Sift OnDMARC, to stop compromised SVGs before they reach the end user.

Key takeaways:

  • Weaponized SVGs evade traditional scans, instantly redirecting users or dropping malware.
  • Threat-intelligence shows this tactic is growing fast, keeping email the top breach vector.
  • Enforcing DMARC at p=reject blocks unauthenticated messages, including SVG attacks, from causing malicious harm.

Scalable Vector Graphics (SVG) files are designed to be harmless image files. Yet attackers have discovered they can hide JavaScript inside an SVG’s XML code and trick email gateways that treat the file as “just an image.” 

In a recent article from Infosecurity Magazine, new reports discuss a wave of phishing emails carrying weaponized SVG attachments that redirect victims to credential-harvesting sites – often without triggering traditional antivirus or sandboxing tools. Even leading threat-intelligence reports now list SVG-borne scripts among the fastest-growing email-borne threats, underscoring how creative threat actors have become in sidestepping security stacks.

Why this matters for every business

Email remains the top initial-access vector for ransomware, business email compromise (BEC), spoofing and data theft. An exploit that lets attackers blend executable code with innocuous artwork raises the stakes:

  • Bypasses reputation-based filters. Because the malicious payload lives in an image, many Secure Email Gateways (SEGs) don’t extract or scan the JavaScript, letting the attachment sail through.
  • Delivers instant redirects. As soon as the image renders in the browser, an embedded script can forward the user to a fake login page or start a malware dropper chain.
  • Masks domain impersonation. Attackers can spoof your brand in the “From: header” and deliver a “perfect-looking” file, leading to a potential erosion in customer trust. 

Traditional perimeter controls alone can’t keep pace with this kind of innovation. Organizations need an authentication layer that tells receiving mail servers, unequivocally, which messages are legitimate – and blocks the rest before they ever reach employees.

DMARC: The essential defense for all

Domain-based Message Authentication, Reporting, and Conformance (DMARC) enables a domain owner to say: “If an email claiming to be from me fails both SPF and DKIM checks, do X.” DMARC has three different policies: none, quarantine, and reject. The strongest (p=reject) ensures spoofed emails are dropped outright instead of landing in spam or limbo. Anything less leaves room for human error or filter evasion – the very gaps SVG-JavaScript attacks exploit.

Red Sift works with organizations daily to reach DMARC enforcement, reducing impersonation attacks to near-zero, improving email deliverability, and providing users with actionable visibility through aggregated reporting.

Make it easy to stay secure, choose OnDMARC

Choosing DMARC isn’t just a security upgrade, it’s a smart business move that reduces risk, cuts hidden email-related costs, and safeguards customer confidence. Red Sift OnDMARC streamlines the hard parts: real-time configuration checks, one-click DNS updates, and deep telemetry from DNS Guardian trim weeks off the journey to enforcement.

An intuitive UI, award-winning support, and baked-in compliance guidance let organizations of any size secure their domains, and stay ahead of ever-evolving phishing tactics. If you want maximum return on investments for email security and spot harmful SVGs entering your security defense, OnDMARC is the proven, hassle-free choice.

Get started today by checking your DMARC policy in seconds or starting a free 14-day OnDMARC trial.

PUBLISHED BY

Jack Lilley

16 Jul. 2025

SHARE ARTICLE:

Categories

Recent Posts

VIEW ALL
Email

What is social engineering and how can you prevent it?

Jack Lilley

Executive summary: Email phishing has evolved and criminals now use social engineering to impersonate executives, suppliers, and even government agencies, persuading recipients to approve payments or disclose credentials. Because human judgment sits at the heart of these attacks, technical controls that eliminate spoofed messages before they reach the inbox are essential. DMARC provides that…

Read more
Cybersecurity

Attackers are abusing Microsoft 365: Here’s how to stay protected

Jack Lilley

Executive summary: Varonis has surfaced an active phishing campaign that spoofs internal users by abusing Microsoft 365’s Direct Send feature. Because Direct Send doesn’t require authentication and is treated as “internal,” these messages often bypass the checks you rely on for outside mail. Microsoft now offers an opt-in switch, RejectDirectSend, to block the pathway,…

Read more
BEC

SVGs with JavaScript are bypassing traditional email security: Learn how to stay…

Jack Lilley

Executive summary: Hackers are hiding JavaScript inside SVG attachments that pass as harmless images, and slipping past Secure Email Gateways (SEGs). To stay secure, organizations need to enforce a DMARC policy of p=reject, easily implemented with Red Sift OnDMARC, to stop compromised SVGs before they reach the end user. Key takeaways: Scalable Vector Graphics…

Read more
DMARC

More than 50% of US banks remain vulnerable to phishing attacks

Stuart Rogers

Executive summary: Over half of major U.S. banks remain exposed to phishing attacks because of weak or absent DMARC enforcement, despite rising cybercrime losses and increasingly sophisticated email threats. Operational challenges, regulatory gaps, and underestimation of risk hinder stronger protections, putting customer trust and financial stability in jeopardy. Key takeaways Email remains the primary…

Read more