
Cloud Vulnerability DB
A community-led vulnerabilities database
The HTML Injection vulnerability (GHSA-cg48-9hh2-x6mx) affects Preact versions 10.x on prerelease tags alpha and beta prior to 10.0.0-beta.1. The vulnerability was discovered and disclosed in 2019, with the fix being released in version 10.0.0-beta.1. The issue affects the Preact JavaScript library, which is commonly used for building user interfaces (GitHub Advisory).
The vulnerability stems from insufficient input validation that allows attackers to inject JavaScript objects as virtual-dom nodes. The issue occurs when user input parsed with JSON.parse() is passed directly into JSX without proper sanitization. This vulnerability is classified with CWE-74 and has been assessed as having Moderate severity (GitHub Advisory, Preact Release).
If successfully exploited, this vulnerability could lead to Cross-Site Scripting (XSS) attacks. The impact is particularly significant when user input is parsed with JSON.parse() and directly passed into JSX without sanitization, potentially allowing attackers to execute malicious JavaScript code in the context of the affected application (GitHub Advisory).
The vulnerability requires specific conditions to be exploitable: the application must be using an affected version of Preact, and there must be a flow where user input is parsed with JSON.parse() and passed directly into JSX without sanitization. The exploit involves injecting malicious JavaScript objects as virtual-dom nodes (GitHub Advisory, DailyJS Article).
The recommended mitigation is to upgrade to Preact version 10.0.0-beta.1 or later, which includes the security fix. The fix involves adding protection mechanisms similar to those implemented in React to prevent JSON injection attacks. The patch was implemented through PR #1528, which prevents the injection of JavaScript objects as virtual-dom nodes (GitHub Advisory, Preact PR).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."