Wednesday, April 8, 2026

Hackers Exploit CSS Properties to Conceal Malicious Code in Hidden Text Salting Attacks

In a sophisticated evolution of email-based attacks, adversaries have begun leveraging Cascading Style Sheets (CSS) to inject hidden “salt” — irrelevant content used to confuse detection systems — deep within HTML emails.

Cisco Talos’s year-long monitoring (March 1, 2024 – July 31, 2025) reveals a marked increase in the abuse of CSS properties to conceal malicious code and hamper both signature-based and advanced ML-driven defenses.

By embedding hidden text salts in strategic email components, attackers can evade filters, manipulate language detection, and even distort LLM-based intent analysis.

Hidden text salting emerged as a countermeasure to growing email defenses. Initially, threat actors inserted random characters between keywords to slip past signature scanners.

Over time, adversaries refined the approach by styling these characters with CSS properties—such as setting font-size:0 or opacity:0—to make the salt invisible to users but legible to parsers.

By hiding irrelevant French terms amidst English text, attackers have tricked Microsoft’s language detection into misclassifying phishing emails, sending them through filters unscathed.

In one case, a PayPal-impersonating scam contained the sentence “Great news, we’ve got your order” concealed in a <div> with font-size:1px and line-height:0, only revealed when font size was increased to 20px.

A scam email impersonating the PayPal brand.
A scam email impersonating the PayPal brand.

Likewise, Harbor Freight phishing emails included hidden French salt via display:none, confusing the X-Forefront-Antispam-Report language field.

Techniques and Examples

Cisco Talos categorizes the misuse of CSS for hidden text salting into three content types and four insertion points. The content types are random characters, irrelevant paragraphs, and HTML/JavaScript comments.

Characters often include zero-width spaces (ZWSP) or non-joiners (ZWNJ) inserted between brand names, as seen in Norton LifeLock impersonations.

HTML source snippet of the above phishing email, with ZWSP and ZWNJ characters.
HTML source snippet of the above phishing email, with ZWSP and ZWNJ characters.

Attackers embed German and Finnish phrases in paragraph salt within HTML attachments to thwart static analysis. In another campaign, irrelevant comments were interspersed within Base64-encoded URLs to complicate decoding.

These salts appear in four main email regions: preheader, header, attachments, and body. Preheaders have contained tempting phrases like “FOUR yummy soup recipes just for you!” hidden via opacity:0, max-height:0, and mso-hide:all to entice clicks without detection.

HTML source snippet of the above phishing email, showing how salt is added to the pre-header text.
HTML source snippet of the above phishing email, showing how salt is added to the pre-header text.

Attachments carry salts in HTML, where attackers insert random comments around Base64 data. The body remains the most common locus, with raw keywords interspersed with junk characters to evade filters.

Attackers also manipulate CSS property categories to cloak salt. Text properties (font-size, color, line-height) shrink or recolor text to blend with backgrounds.

Visibility and display properties (display:none, visibility:hidden) remove elements from rendering. Clipping and sizing (width:0, overflow:hidden) clip hidden text within zero-dimension containers.

In a Wells Fargo phishing example, meaningful keywords were salted using a global bdo selector with font-size:0, altering the intent classification of LLM-based defenses from “Request Action” to “Schedule Meeting.”

Mitigations

Defenders must adopt a dual approach: detection and filtering. Detection solutions should extend beyond simple text parsing to analyze CSS usage patterns and visual discrepancies.

Talos selected a few simple CSS properties that can be used to hide the added salt, including “font-size: 0,” “opacity: 0,” “display: none,” “max-width: 0,” “max-height: 0,” “color: transparent,” “visibility: hidden,” “width: 0” or “height: 0.” We then searched for these indicators in emails reclassified by Cisco Secure ETD customers.

The prevalence of hidden content in spam and ham messages.
The prevalence of hidden content in spam and ham messages.

Advanced filters can inspect email parts—preheader, header, body, attachments—to identify and flag hidden content. Incorporating visual-based analysis, such as rendering email snapshots to detect invisible overlays, can thwart image-based threats.

Organizations should fine-tune policies to tolerate legitimate uses while flagging abnormal CSS payloads. Adopting AI-driven, deep-learning models that consider visual, structural, and contextual features can dramatically improve resilience against this evasive tactic.

Filtering solutions must sanitize HTML at ingestion, stripping or escaping invisible elements before downstream engines process messages. Email gateways can deploy prompt guards to ignore any content styled as hidden.

Hidden text salting is far more prevalent in spam and phishing than in legitimate mail, though some benign uses of CSS (responsive design, tracking pixels) resemble these techniques.

By recognizing and neutralizing hidden text salting, security teams can restore the integrity of email defenses and prevent adversaries from slipping past layers of protection.

Continuous monitoring of CSS misuse, coupled with proactive sanitization, will be critical in countering this emerging threat.

Follow us on Google NewsLinkedIn, and X to Get Instant Updates and Set GBH as a Preferred Source in Google.

Mayura Kathir
Mayura Kathirhttps://gbhackers.com/
Mayura Kathir is a cybersecurity reporter at GBHackers News, covering daily incidents including data breaches, malware attacks, cybercrime, vulnerabilities, zero-day exploits, and more.

Hot this week

How To Access Dark Web Anonymously and know its Secretive and Mysterious Activities

What is Deep Web The deep web, invisible web, or...

How to Build and Run a Security Operations Center (SOC Guide) – 2023

Today’s Cyber security operations center (CSOC) should have everything...

Network Penetration Testing Checklist – 2025

Network penetration testing is a cybersecurity practice that simulates...

Russian Hackers Bypass EDR to Deliver a Weaponized TeamViewer Component

TeamViewer's popularity and remote access capabilities make it an...

Web Server Penetration Testing Checklist – 2026

Web server pentesting is performed under three significant categories: identity,...

ComfyUI Servers Hijacked for Cryptomining, Proxy Botnet Ops

Hackers are aggressively hijacking Internet-exposed ComfyUI servers and converting...

Claude Identifies Critical 13-Year-Old RCE Vulnerability in Apache ActiveMQ

An AI assistant recently uncovered a critical remote code...

BPFDoor Variants Hide with Stateless C2 and ICMP Relay Tactics

Seven new BPFDoor variants that push Linux backdoor tradecraft...

Windmill Developer Platform Flaws Expose Users to RCE Attacks, Proof-of-Concept Published

Cybersecurity researchers have discovered critical vulnerabilities in the Windmill...

Kubernetes Flaws Let Hackers Jump From Containers to Cloud Accounts

Hackers are increasingly abusing Kubernetes misconfigurations to jump from...

GPUBreach Attack Could Lead to Full System Takeover and Root Shell Access

A newly discovered vulnerability dubbed "GPUBreach" demonstrates that GPU-based...

Fake Gemini npm Package Steals AI Tool Tokens

Hackers are abusing a fake Gemini-themed npm package to...

Related Articles

Recent News