CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-22028

Preact's Identity Crisis: When JSON Becomes Code via CVE-2026-22028

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 24, 2026·6 min read·90 visits

Executive Summary (TL;DR)

Preact forgot how to tell the difference between a real Virtual DOM node and a JSON object masquerading as one. If you pass user-controlled JSON into a render tree, attackers can inject arbitrary HTML components and execute JavaScript.

A high-severity type confusion vulnerability in Preact allows attackers to smuggle malicious Virtual DOM nodes via simple JSON payloads, leading to Cross-Site Scripting (XSS). A regression in version 10.26.5 weakened the internal validation logic, causing the framework to mistake plain JavaScript objects for trusted VNodes.

The Hook: Trust Issues in the Virtual DOM

In the modern web ecosystem, we've largely outsourced our DOM manipulation anxiety to frameworks like React and Preact. We trust them to take our messy state and efficiently paint the screen. We assume that when we write <div>{userInput}</div>, the framework will treat userInput as exactly that: text. Maybe a number. But certainly not executable code.

Preact, the lightweight cousin of React, operates on Virtual DOM (VNode) objects. These are lightweight JavaScript objects that describe what the UI should look like. To prevent chaos, Preact (and React) historically rely on a mechanism to distinguish a "blessed" VNode created by the framework from a random JSON object sent by an API.

Usually, this is done via Symbols or non-enumerable properties—things that JSON.stringify() destroys and JSON.parse() cannot recreate. It is the digital equivalent of a holographic watermark on a banknote. If the watermark isn't there, it's just monopoly money.

But in CVE-2026-22028, Preact stopped checking for the watermark. It started accepting the monopoly money. And unfortunately for us, the attackers are printing cash.

The Flaw: A Case of Mistaken Identity

The vulnerability is a classic Type Confusion bug, specifically CWE-843. The core issue lies in how Preact decides if a JavaScript object is a valid VNode that should be rendered as an element, or just a plain object that should be stringified or ignored.

Prior to version 10.26.5, Preact enforced strict checks. It looked for specific internal markers—often Symbols or specific integer constants—that an attacker cannot inject via a standard JSON payload because JSON doesn't support them. You can't put Symbol('react.element') in a JSON file. It just doesn't parse.

However, a regression introduced in 10.26.5 "softened" these checks. The developers likely tried to optimize the hot path of the renderer or support a specific edge case for serialization. In doing so, they inadvertently allowed "Duck Typing" on VNodes.

If it looks like a VNode (has a props property, has a type property) and quacks like a VNode (has a __v property set to 0 or null), Preact says, "Come on in!" This allows an attacker to construct a JSON object that satisfies these loose constraints, effectively forging a VNode without ever calling createElement.

The Code: Removing the Safety Rails

Let's look at the logic. In a secure implementation, the check often involves a Symbol. Since JSON.parse returns "Plain Old JavaScript Objects" (POJOs), a secure check fails immediately against network data.

The Secure Pattern (Conceptual):

// Inside Preact's render loop
if (child && child.$$typeof === REACT_ELEMENT_SYMBOL) {
  // It's a real VNode, render it.
  renderVNode(child);
} else {
  // It's just data. Escape it and show text.
  document.createTextNode(String(child));
}

The Vulnerable Pattern (Regression):

Around version 10.26.5, the logic shifted to something that looks dangerously like this:

// The check became looser to support some internal optimization
if (child && (child.__v === 0 || child.constructor === undefined)) {
   // "Looks legit to me!"
   renderVNode(child);
}

The critical failure here is that __v: 0 is perfectly valid JSON. An attacker doesn't need to bypass a memory protection or guess a randomization seed; they just need to send { "__v": 0 } in their payload. The framework creates a VNode instance from this raw data, essentially letting the attacker define the type (HTML tag) and props (attributes) of the rendered element.

The Exploit: Weaponizing JSON

How does a hacker turn this into a weapon? Imagine a user profile page that fetches data from an API. The frontend code looks innocent enough:

// Vulnerable component
const Profile = ({ userBio }) => {
  // userBio comes directly from JSON.parse(apiResponse)
  return <div>{userBio}</div>;
};

Normally, if userBio is a string, it renders text. If userBio is an object, React/Preact usually warns you or stringifies it to [object Object]. But thanks to the type confusion, we can feed it a structure that Preact interprets as a command to render an image tag with an XSS payload.

The Payload:

{
  "type": "img",
  "props": {
    "src": "invalid_url_to_trigger_error",
    "onerror": "alert('System Compromised via Preact!');"
  },
  "__v": 0
}

When the application processes this:

  1. The API returns the JSON.
  2. The application passes the object into the JSX {userBio} expression.
  3. Preact inspects the object.
  4. It sees __v: 0 and assumes this is a valid VNode.
  5. It reads type: "img" and creates an <img> DOM element.
  6. It applies the props. src fails to load, triggering onerror.
  7. Boom. Arbitrary JavaScript execution in the victim's session.

This isn't just an alert box. It's cookie theft, session hijacking, or forcing the user to perform actions (CSRF) on the platform.

The Impact: Why This Matters

This vulnerability is particularly nasty because it turns standard data handling into a remote code execution vector (in the browser context). Developers are taught to sanitize HTML strings, but they are rarely taught to sanitize JSON objects passed to the render tree because the framework is supposed to handle that isolation.

If you are using Preact 10.26.5 through 10.28.1, any endpoint where a user can store a JSON object that gets rendered into a view is a potential XSS vector. This includes:

  • User Profiles: Bio fields, custom statuses.
  • Comments: If the comment body is stored as JSON.
  • Config Dashboards: Where settings might be rendered dynamically.

The CVSS score is 7.2 (High), but in the right application—say, a chat app or a dashboard with high privileges—the impact is critical. It bypasses standard XSS filters that look for <script> tags because the payload is just a JSON object.

The Fix: Closing the Window

The Preact team responded quickly (and correctly) by reverting the loose check and restoring strict type validation. The patch essentially ensures that VNodes must be created by the framework's internal factory methods, which stamp them with symbols or non-serializable properties that cannot be spoofed via JSON.

Remediation Steps:

  1. Update Immediately: Move to 10.26.10, 10.27.3, or 10.28.2 depending on your branch.
  2. Audit Your Renders: Search your codebase for usage of {variable} where variable comes directly from an API response without validation.
  3. Defensive Coding: Even after patching, avoid passing raw objects to the render tree. Cast them explicitly:
// Do this:
<div>{String(userBio)}</div>
 
// Or this (if you expect an object structure):
<div>{userBio.text}</div>

This is a stark reminder: libraries are code, and code has bugs. Trust, but verify. And maybe don't trust JSON quite so much.

Official Patches

PreactOfficial GitHub Advisory and Patch Details

Technical Appendix

CVSS Score
7.2/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
EPSS Probability
0.05%
Top 85% most exploited

Affected Systems

Preact Framework (10.26.x, 10.27.x, 10.28.x)Single Page Applications (SPAs) using PreactWeb components built with Preact

Affected Versions Detail

Product
Affected Versions
Fixed Version
Preact
Preact
10.26.5 - 10.26.910.26.10
Preact
Preact
10.27.0 - 10.27.210.27.3
Preact
Preact
10.28.0 - 10.28.110.28.2
AttributeDetail
CWE IDCWE-843 (Type Confusion)
Attack VectorNetwork (JSON Payload)
CVSS v3.16.1 (Medium)
CVSS v4.07.2 (High)
ImpactCross-Site Scripting (XSS)
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1059.007Command and Scripting Interpreter: JavaScript
Execution
T1190Exploit Public-Facing Application
Initial Access
CWE-843
Access of Resource Using Incompatible Type ('Type Confusion')

The product accesses a resource using an incompatible type, triggering a logic error that allows arbitrary code execution or component injection.

Known Exploits & Detection

Internal ResearchJSON payload demonstrating VNode spoofing via `__v: 0` property.

Vulnerability Timeline

CVE-2026-22028 Published
2026-01-08
GHSA-36hm-qxxp-pg3m Advisory Released
2026-01-08
Patches Issued (10.26.10, 10.27.3, 10.28.2)
2026-01-08

References & Sources

  • [1]Preact Release Notes
  • [2]NIST CVE-2026-22028 Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•15 minutes ago•CVE-2026-9799
4.6

CVE-2026-9799: Authorization Bypass via UMA Permission Ticket Wildcard in Keycloak

CVE-2026-9799 is an authorization bypass vulnerability in the User-Managed Access (UMA) subsystem of Keycloak (org.keycloak.authorization). When a resource server is configured with the non-default PERMISSIVE policy enforcement mode, an authenticated user holding a valid UMA permission ticket for a single typed resource can obtain an authorization Requesting Party Token (RPT) granting access to all resources of the same type across the resource server. By submitting an authorization request with the type selector prefix 'resource-type-any:<type>', the attacker bypasses instance-level owner approval checks for unshared peer resources that lack explicit static administrative policies.

Alon Barad
Alon Barad
0 views•9 min read
•about 1 hour ago•CVE-2026-9083
4.9

CVE-2026-9083: Arbitrary Filesystem Path Probing in Keycloak Java Keystore Key Provider

CVE-2026-9083 is a path traversal and information disclosure vulnerability (CWE-22) affecting Keycloak and the Red Hat build of Keycloak. The vulnerability resides in the Java Keystore key provider component (JavaKeystoreKeyProviderFactory), which fails to restrict the user-supplied keystore file path to a designated directory. An authenticated realm administrator holding the 'manage-realm' role can supply arbitrary absolute or relative filesystem paths when configuring a key provider. Because the application returns distinct error messages depending on whether the target path does not exist, lacks read permissions, or fails keystore parsing, an attacker can use this component as an oracle to probe the underlying host filesystem.

Alon Barad
Alon Barad
4 views•11 min read
•about 2 hours ago•CVE-2026-9086
7.3

CVE-2026-9086: Stored Cross-Site Scripting via Case-Sensitive URI Scheme Validation Bypass in Keycloak

CVE-2026-9086 is a stored Cross-Site Scripting (XSS) vulnerability in Keycloak and the Red Hat build of Keycloak. The vulnerability stems from a case-sensitive URI scheme validation check in DefaultClientValidationProvider, allowing attackers with client registration or management permissions to inject javascript: or data: URIs using mixed-case characters.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 3 hours ago•CVE-2026-62290
7.3

CVE-2026-62290: ClusterIssuer DNS01 Solver Policy Bypass and Credential Exfiltration in cert-manager

CVE-2026-62290 is an incorrect authorization vulnerability (CWE-863) in cert-manager that allows low-privileged Kubernetes namespace tenants to bypass ClusterIssuer DNS01 solver policies and exfiltrate cluster-scoped DNS credentials. By directly creating standalone ACME Challenge custom resources rather than going through the standard Certificate and Order workflow, an attacker can specify arbitrary solver provider configurations while referencing a privileged ClusterIssuer. The cert-manager ACME challenge controller reconciles these directly instantiated Challenge resources without verifying their parentage or validating the user-supplied solver parameters against the referenced ClusterIssuer's selector policies.

Amit Schendel
Amit Schendel
7 views•9 min read
•about 4 hours ago•CVE-2026-118662
6.9

CVE-2026-118662: Access Control Bypass via Uncanonicalized Query Parameters in Vite Development Server

CVE-2026-118662 (also tracked as GHSA-8g5g-mxqh-grgj) is an improper access control and path canonicalization vulnerability in the Vite frontend build and development tool. In version 6.4.4, the Vite development server fails to strip transform and loader query parameters before evaluating file paths against the `server.fs.deny` configuration directive. When the development server is exposed to a network and sensitive files located within `server.fs.allow` match patterns in `server.fs.deny`, an unauthenticated remote attacker can bypass file access restrictions by appending specific query strings such as `?raw` or `?inline` to HTTP requests. This allows arbitrary retrieval of restricted files, including environment configuration files and private cryptographic keys.

Alon Barad
Alon Barad
8 views•11 min read
•about 5 hours ago•CVE-2026-115909
7.5

CVE-2026-115909: Unbounded Symlink-Target Allocation Causes Process Abort in Rust zip Crate

A vulnerability in the Rust `zip` crate (versions 1.3.0 prior to 9.0.0) allows an attacker to trigger an uncatchable process abort via a crafted ZIP archive. When extracting symbolic link entries on Unix or Windows targets, `ZipArchive::extract` passes the untrusted, attacker-controlled `uncompressed_size` header value directly to `Vec::with_capacity` before reading or validating entry payload data. By supplying a 112-byte archive with a ZIP64 extended information field declaring an excessive uncompressed size, an attacker forces the memory allocator to fail and invoke `handle_alloc_error()`, immediately terminating the entire process with `SIGABRT`.

Alon Barad
Alon Barad
5 views•11 min read