Navigating the Security Risk of Using Arbitrary Values in Tailwind CSS #14310
Replies: 1 comment
-
Can you share a live demo of the problem you're trying to outline here? There is no risk of anything with the code sample in the blog post as far as I can tell. Even when you use a literal https://play.tailwindcss.com/kYO4u0l5PJ There is no way for this CSS to run a malicious script sitting in a data attribute as far as I know: .my-class::before {
content: attr(data-message);
} If this were possible, the security vulnerability would be with the native CSS |
Beta Was this translation helpful? Give feedback.
-
I recently discovered a couple of instances where there is an opportunity for XXS attacks when using arbitrary values in Tailwind CSS utility classes.
You can read more about it in my article at:
dev.to
Medium
My Blog
Beta Was this translation helpful? Give feedback.
All reactions