Skip to content
Heist/ feed
Back to feed
High

Preact has JSON VNode Injection issue

Type: advisorySources: OSV

Preact, a lightweight web development framework, 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 JSON payloads are assumed to be strings and passed unmodified to Preact as children, a specially-crafted JSON payload could be constructed that would be incorrectly treated as a valid VNode. When this chain of failures occurs it can result in HTML injection, which can allow arbitrary script execution if not mitigated by CSP or other means. Applications using affected Preact versions are vulnerable if they meet all of the following conditions: first, pass unmodified, unsanitized values from user-modifiable data sources (APIs, databases, local storage, etc.) directly into the render tree; second assume these values are strings but the data source could return actual JavaScript objects instead of JSON strings; and third, 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). Versions 10.26.10, 10.27.3, and 10.28.2 patch the issue. The patch versions restore the previous strict equality checks that prevent JSON-parsed objects from being treated as valid VNodes. Other mitigations are available for those who cannot immediately upgrade. Validate input types, cast or validat

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-22028
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 09:04 UTC · Revision 1

Source evidence

Preact has JSON VNode Injection issue

core-osv · Original source

Published 8 Jan 2026, 14:16 UTC

Preact, a lightweight web development framework, 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 JSON payloads are assumed to be strings and passed unmodified to Preact as children, a specially-crafted JSON payload could be constructed that would be incorrectly treated as a valid VNode. When this chain of failures occurs it can result in HTML injection, which can allow arbitrary script execution if not mitigated by CSP or other means. Applications using affected Preact versions are vulnerable if they meet all of the following conditions: first, pass unmodified, unsanitized values from user-modifiable data sources (APIs, databases, local storage, etc.) directly into the render tree; second assume these values are strings but the data source could return actual JavaScript objects instead of JSON strings; and third, 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). Versions 10.26.10, 10.27.3, and 10.28.2 patch the issue. The patch versions restore the previous strict equality checks that prevent JSON-parsed objects from being treated as valid VNodes. Other mitigations are available for those who cannot immediately upgrade. Validate input types, cast or validat

osv:CVE-2026-22028
Complete source record
{
  "id": "4b3eefb28bdfb1eb972ef1aed7fa89c72db39435d36c181266a9d8bb3f1877ab",
  "url": "https://osv.dev/vulnerability/CVE-2026-22028",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Preact has JSON VNode Injection issue",
    "summary": "Preact, a lightweight web development framework, 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 JSON payloads are assumed to be strings and passed unmodified to Preact as children, a specially-crafted JSON payload could be constructed that would be incorrectly treated as a valid VNode. When this chain of failures occurs it can result in HTML injection, which can allow arbitrary script execution if not mitigated by CSP or other means. Applications using affected Preact versions are vulnerable if they meet all of the following conditions: first, pass unmodified, unsanitized values from user-modifiable data sources (APIs, databases, local storage, etc.) directly into the render tree; second assume these values are strings but the data source could return actual JavaScript objects instead of JSON strings; and third, 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). Versions 10.26.10, 10.27.3, and 10.28.2 patch the issue. The patch versions restore the previous strict equality checks that prevent JSON-parsed objects from being treated as valid VNodes. Other mitigations are available for those who cannot immediately upgrade. Validate input types, cast or validat",
    "evidence": "osv:CVE-2026-22028",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-22028",
      "aliases": [
        "CVE-2026-22028",
        "GHSA-36hm-qxxp-pg3m"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/preactjs/preact",
              "type": "GIT",
              "events": [
                {
                  "introduced": "f6bbed502197a5ac216235fc4c322281c9fbce7a"
                },
                {
                  "fixed": "e6f88b08422a00f7348f4f7326f6130122045d49"
                },
                {
                  "introduced": "e42b82b17b3bf2ef5ff1f26328582254d7348278"
                },
                {
                  "fixed": "eb63d406aa91e45eaa71b0e5d69eb1de4f35f279"
                },
                {
                  "introduced": "b36b6a714810b92c572bc7d7c906180b4f975a24"
                },
                {
                  "fixed": "6f914464b3c9e848e98963be183693ad502ffd92"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:preactjs:preact:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "10.26.5"
                      },
                      {
                        "fixed": "10.26.10"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:preactjs:preact:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "10.27.0"
                      },
                      {
                        "fixed": "10.27.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:preactjs:preact:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "10.28.0"
                      },
                      {
                        "fixed": "10.28.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "10.26.9",
            "10.27.2",
            "10.28.1",
            "10.28.0",
            "10.27.1",
            "10.27.0",
            "10.26.8",
            "10.26.7",
            "10.26.6",
            "10.26.5"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-22028.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:47.286892641Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22028.json",
        "https://github.com/preactjs/preact/security/advisories/GHSA-36hm-qxxp-pg3m",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-22028"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-843"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22028.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-22028",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 515050,
  "published_at": "2026-01-08T14:16:22.461+00:00"
}