Access of Resource Using Incompatible Type ('Type Confusion') Affecting preact package, versions >=10.26.5 <10.26.10>=10.27.0 <10.27.3>=10.28.0 <10.28.2


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.05% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Access of Resource Using Incompatible Type ('Type Confusion') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-PREACT-14897824
  • published8 Jan 2026
  • disclosed7 Jan 2026
  • creditYoungGeun Choi

Introduced: 7 Jan 2026

CVE-2026-22028  (opens in a new tab)
CWE-843  (opens in a new tab)

How to fix?

Upgrade preact to version 10.26.10, 10.27.3, 10.28.2 or higher.

Overview

preact is a fast 3kB alternative to React with the same modern API.

Affected versions of this package are vulnerable to Access of Resource Using Incompatible Type ('Type Confusion') during rendering in the vnode constructor. An attacker can inject arbitrary HTML or execute scripts by supplying specially crafted JSON objects that are incorrectly interpreted as valid VNodes when unsanitized, unvalidated user input is passed directly into the render tree.

Note:

This is only exploitable if applications pass unmodified, unsanitized values from user-modifiable data sources directly into the render tree, assume these values are strings while the data source could return JavaScript objects, and the data source fails to perform type sanitization or is compromised.

##Workaround

This vulnerability can be mitigated by validating input types, enforcing strict type contracts at API boundaries, casting or validating network data before rendering, sanitizing external data, and implementing a strict Content Security Policy (CSP) to prevent inline script execution.

References

CVSS Base Scores

version 4.0
version 3.1