GHSA-cg48-9hh2-x6mx
HTML Injection in preact
Versions of preact 10.x on prerelease tags alpha and beta prior to 10.0.0-beta.1 are vulnerable to HTML Injection. Due to insufficient input validation the package allows attackers to inject JavaScript objects as virtual-dom nodes, which may lead to Cross-Site Scripting. This requires user input parsed with JSON.parse() to be passed directly into JSX without sanitization.
Recommendation
Upgrade to version 10.0.0-beta.1.
What each source reports
GitHub AdvisoriesNo score
HTML Injection in preact
Versions of preact 10.x on prerelease tags alpha and beta prior to 10.0.0-beta.1 are vulnerable to HTML Injection. Due to insufficient input validation the package allows attackers to inject JavaScript objects as virtual-dom nodes, which may lead to Cross-Site Scripting. This requires user input parsed with JSON.parse() to be passed directly into JSX without sanitization.
Recommendation
Upgrade to version 10.0.0-beta.1.
- Record
GHSA-cg48-9hh2-x6mx- Weakness
- CWE-74
- Updated
- 2026-11-02
OSVNo score
HTML Injection in preact
Versions of preact 10.x on prerelease tags alpha and beta prior to 10.0.0-beta.1 are vulnerable to HTML Injection. Due to insufficient input validation the package allows attackers to inject JavaScript objects as virtual-dom nodes, which may lead to Cross-Site Scripting. This requires user input parsed with JSON.parse() to be passed directly into JSX without sanitization.
Recommendation
Upgrade to version 10.0.0-beta.1.
- Record
GHSA-cg48-9hh2-x6mx- Weakness
- CWE-74
- Updated
- 2026-11-02
Affected packages
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | GitHub Advisories, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
GHSA-cg48-9hh2-x6mx is a vulnerability with no CVSS score yet in preact, published September 2, 2020. No source lists public exploit code. Fixed in preact 10.0.0-beta.1.