{"id":5416,"date":"2025-07-17T10:05:29","date_gmt":"2025-07-17T10:05:29","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/07\/17\/threat-actors-weaponizing-svg-files-to-embed-malicious-javascript\/"},"modified":"2025-07-17T10:05:29","modified_gmt":"2025-07-17T10:05:29","slug":"threat-actors-weaponizing-svg-files-to-embed-malicious-javascript","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/07\/17\/threat-actors-weaponizing-svg-files-to-embed-malicious-javascript\/","title":{"rendered":"Threat Actors Weaponizing SVG Files to Embed Malicious JavaScript"},"content":{"rendered":"<p>    Threat Actors Weaponizing SVG Files to Embed Malicious JavaScript<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>Threat actors are quietly turning Scalable Vector Graphics (SVG) files into precision-guided malware. In a surge of phishing campaigns, seemingly innocuous <code>.svg<\/code> attachments slip past secure email gateways because mail filters regard them as static images.<\/p>\n<p>Once the recipient merely previews the file, hidden JavaScript executes inside the browser, triggering an invisible redirect chain that funnels victims to attacker infrastructure.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEj06cpR-9t09vh8vEQ_R1v0y0OyWP0Iivz5H9ZrRM1xa05tWeiW4kxaWxSIwwdIrL7hwiv0bXMgeZBVP_3SkDdyv0ORFX_ZVgCio_XvtXG3Bx0wqxBlpwEDwX0CwN4uyavaEeVV23fRy0v7nPZIkch_HqQWXqaUJwFButSjBEH9BuLSKHInU4lxSFp2RPg\/s16000\/The%2520Recipient%25E2%2580%2599s%2520perspective%2520%28Source%2520-%2520Ontinue%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">The Recipient\u2019s perspective (Source \u2013 Ontinue)<\/figcaption><\/figure>\n<\/div>\n<p>The lure emails are minimalist\u2014often a single icon or <strong>\u201cMissed Call\u201d<\/strong> teaser\u2014and exploit organisations that have weak SPF, DKIM or DMARC enforcement.<\/p>\n<p>As the attachments bypass signature checks, the first line of defence fails; Ontinue analysts <a href=\"https:\/\/www.ontinue.com\/resource\/blog-svg-smuggling\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">identified<\/a> the wave after correlating near-identical SVGs sent to B2B service providers and SaaS vendors, all containing distinct Base64 tracking strings that map each click to a workstation.<\/p>\n<p>Since no executable is dropped, endpoint agents see only normal browser activity while credentials are siphoned off on well-crafted Microsoft 365 look-alike portals.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEiYAmPFhKAY1SIwaMxvaZpCpwkjM7Lex_XV_94ZuaNQ9lLBbTTAC8s8dlZOE95nNxrfqEyc5NoK96wf76HpCM3R-jpfAgUe6UZk2zapyM4j-dk4ng3X38CJr8PYGq5uFnHFOw9II8wV_meqILe4gB-6NH7eUeFOGJmIK3FGvdtxR5Amz0rxtEs4ckuQw-8\/s16000\/Typical%2520M365%2520Credential%2520Phishing%2520%28Source%2520-%2520Ontinue%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">Typical M365 Credential Phishing (Source \u2013 Ontinue)<\/figcaption><\/figure>\n<\/div>\n<p>Beyond <a href=\"https:\/\/cybersecuritynews.com\/credential-theft-risks\/\" target=\"_blank\" rel=\"noreferrer noopener\">credential theft<\/a>, the technique exemplifies a broader strategic pivot: adversaries increasingly weaponise file formats that browsers render natively, removing the social-engineering friction of persuading users to run macros or installers.<\/p>\n<p>Security controls that focus on executables, archives or scripts alone find themselves blind to these pixel-perfect stings.<\/p>\n<h2 class=\"wp-block-heading\"><strong>Infection Mechanism: Self-Decoding JavaScript Smuggling<\/strong><\/h2>\n<p>Each malicious SVG embeds an <a href=\"https:\/\/cybersecuritynews.com\/highly-obfuscated-net-sectoprat\/\" target=\"_blank\" rel=\"noreferrer noopener\">obfuscated<\/a> payload between \u201c tags. A ten-byte XOR key masks the script, frustrating static scanners, while a two-stage routine reconstructs the redirect at runtime.<\/p>\n<p>First, a short function iterates through the encrypted blob, returning plaintext; then it leverages the <code>Function<\/code> constructor to execute that code entirely in memory.<\/p>\n<p>The revived script concatenates an <code>atob()<\/code>-decoded domain with a victim-specific token before forcing navigation:-<\/p>\n<pre class=\"wp-block-code\"><code>window.location.href = atob(\n  'aHR0cHM6Ly93dnJ6LmxmdGt2b2cubmV0L...' \/\/ domain rotates daily\n) + token;<\/code><\/pre>\n<p>As nothing is written to disk, persistence is irrelevant, and geofencing logic ensures sandboxes outside the target region receive benign pages.<\/p>\n<p>Detecting the threat therefore hinges on deep content inspection that flags script tags inside image files or on correlating unusual <code>.svg<\/code> command-line invocations with email telemetry.<\/p>\n<p>Until such controls mature, organisations should quarantine unsolicited SVGs, enable content disarm and reconstruction, and move DMARC policies from <a href=\"https:\/\/cybersecuritynews.com\/postgresql-monitoring-tools\/\" target=\"_blank\" rel=\"noreferrer noopener\">monitoring<\/a> to reject.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 90%,rgb(169,184,195) 100%)\"><strong>Boost detection, reduce alert fatigue, accelerate response; all with an interactive sandbox built for security teams -&gt;\u00a0<a href=\"https:\/\/any.run\/demo?utm_source=csn&amp;utm_medium=article&amp;utm_campaign=top3_ciso_challenges&amp;utm_content=demo_1&amp;utm_term=160725\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Try ANY.RUN Now<\/a><\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/threat-actors-weaponizing-svg-files\/\">Threat Actors Weaponizing SVG Files to Embed Malicious JavaScript<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Tushar Subhra Dutta<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/threat-actors-weaponizing-svg-files\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Threat Actors Weaponizing SVG Files to Embed Malicious JavaScript Threat actors are quietly turning Scalable Vector Graphics (SVG) files into precision-guided malware. In a surge of phishing campaigns, seemingly innocuous .svg attachments slip past secure email gateways because mail filters regard them as static images. Once the recipient merely previews the file, hidden JavaScript executes [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,649],"tags":[130],"class_list":["post-5416","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-threats","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/5416"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=5416"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/5416\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=5416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=5416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=5416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}