SVG Filters - Clickjacking 2.0 #1635
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
This post presents a new, highly programmable UI-redressing technique the author calls SVG clickjacking. It abuses the fact that modern browsers allow powerful SVG filters (via CSS
filter:url(#id)) to be applied directly to cross-origin iframes. While DOM and JS access are still protected by the Same Origin Policy, the browser’s rendering pipeline supplies the iframe’s rasterized pixels to the SVG filter asSourceGraphic, and almost ...🔧 Technical Details
Trick 1 – Distort cross-origin secrets into fake CAPTCHAs with feTurbulence + feDisplacementMap
If a sensitive code or token is displayed inside a framable endpoint, an attacker can wrap the cross-origin iframe with an SVG filter that visually distorts the underlying text using
<feTurbulence>and<feDisplacementMap>, for example:<filter id="captchaFilter"><feTurbulence type="turbulence" baseFrequency="0.03" numOctaves="4" result="turbulence"/><feDisplacementMap in="SourceGraphic" in2="turbulence" scale="6" xChannelSelector="R" yChannelSelector="G"/></filter>The rendered text looks like a CAPTCHA but remains legible to users. The attacker then places an HTML input on their own page and validates it with a strict
patternmatching the underlying secret (e.g., hex code such as^6c79 ?7261 ?706f ?6e79$). Users believe they are solving a CAPTCHA and retype th...🤖 Agent Actions
Summary:
filter:url(#id)chains can rewrite cross-origin iframe pixels, the SVG primitives that enable it, and how attackers distort secrets, recontextualize inputs, derive pixel-based booleans, and drive multi-step stateful overlays.Tests: Not run (not applicable).
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.