Register for the AI for Security Summit: Join Figma, Perplexity & Wiz
Vulnerability DatabaseGHSA-cg48-9hh2-x6mx

GHSA-cg48-9hh2-x6mx
JavaScript vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Exploitability

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).

Mitigation and workarounds

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).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-54504HIGH8.8
  • JavaScript logoJavaScript
  • @andrea9293/mcp-documentation-server
NoYesSep 17, 2026
CVE-2026-77615HIGH8.7
  • JavaScript logoJavaScript
  • paella-core
NoYesSep 17, 2026
CVE-2026-91127HIGH8.2
  • JavaScript logoJavaScript
  • @file-viewer/doc
NoYesSep 18, 2026
CVE-2026-77301HIGH7.5
  • JavaScript logoJavaScript
  • openclaw
NoYesSep 18, 2026
CVE-2026-84992MEDIUM6.1
  • JavaScript logoJavaScript
  • md-editor-v3
NoYesSep 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management