High

Obfuscated javascript: XSS — Evasion Variants (href, style-expression, null-byte)

This detects attempts to sneak malicious JavaScript past basic security filters by disguising it with hidden characters or repeated keywords. It targets content fed to AI agents that might render or process HTML, such as links or styled text.

How the attack works

An attacker crafts an HTML snippet meant to trigger JavaScript execution, but disguises the tell-tale 'javascript:' string so naive filters miss it. Three tricks are covered: inserting an invisible character like a vertical tab or null byte right before 'javascript:' inside an href attribute; hiding a CSS expression() call inside a style attribute using Unicode whitespace instead of a normal space; or simply writing 'javascript:' twice in a row so a filter that strips it once still leaves one copy behind. If the payload reaches a component that renders or executes it, the attacker's script runs.

Netzilo detection

Netzilo reports this behaviour when it is observed.

Signature ID
59d106ad-b2d0-4d17-a5f6-492b209c27d2
Severity
High

Why it matters

If successful, this lets an attacker run arbitrary script in a context that trusts the input, which can lead to hijacking the agent's session, stealing data it has access to, or manipulating its actions on the attacker's behalf.

What you can do

  • Sanitize and normalize whitespace and encoding before checking for dangerous schemes like 'javascript:' — decode and strip control characters first, then filter.
  • Strip or reject href and style attributes entirely from untrusted input where rich HTML is not required.
  • Use a well-tested HTML sanitization library instead of custom regex or string-matching filters.
  • Expect this rule to flag security research or pentest write-ups that quote these payloads as examples; review matches for actual exploit intent versus discussion text.

Known benign look-alikes

  • Security research papers or blog posts that quote these evasion payloads in code blocks as examples
  • Penetration testing reports that describe XSS evasion techniques

References

Related threats