Input validation error in Preact - CVE-2026-22028

 

Input validation error in Preact - CVE-2026-22028

Published: April 25, 2026


Vulnerability identifier: #VU127933
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-22028
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: npm Inc.
Affected software:
Preact

Detailed vulnerability description

The vulnerability allows a remote attacker to inject HTML.

The vulnerability exists due to improper input validation in the Preact render tree handling of children when processing unmodified user-controlled values from external data sources that are assumed to be strings but are actual JavaScript objects. A remote attacker can supply a specially crafted JSON payload to inject HTML.

Arbitrary script execution may be possible if the injected HTML is not otherwise constrained. Exploitation requires insecure type handling or a compromised data source, and the issue was not present in preact-render-to-string.


How to mitigate CVE-2026-22028

Install security update from vendor's website.

Sources