Preact has JSON VNode Injection issue
CVE-2026-22028 · GHSA-36hm-qxxp-pg3m
- Affected
- npm preact >= 10.26.5, < 10.26.10; >= 10.27.0, < 10.27.3; >= 10.28.0, < 10.28.2
- Fixed in
- 10.28.210.27.310.26.10· Vendor fix available
- Issue
- Impact Vulnerability Type: HTML Injection via JSON Type Confusion Affected Versions: Preact 10.26.5 through 10.28.1 Severity: Low to Medium (see below) Who is Impacted? Applications using affected Preact versions are vulnerable if they meet all of the following conditions: 1. Pass unmodified, unsanitized values from user-modifiable data sources (APIs, databases, local storage, etc.) directly into the render tree 2. Assume these values are strings but the data source could return actual JavaScript objects instead of JSON strings 3. The data source either: - Fails to perform type sanitization AND blindly stores/returns raw objects interchangeably with strings, OR - Is compromised (e.g., poisoned local storage, filesystem, or database) Technical Details Preact includes JSON serialization protection to prevent Virtual DOM elements from being constructed from arbitrary JSON. A regression introduced in Preact 10.26.5 caused this protection to be softened. In applications where values from…
Recommended action: Upgrade to 10.28.2, 10.27.3 or 10.26.10 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.