Skip to content
Heist/ feed
Back to feed
Medium

LeafKit's HTML escaping may be skipped for Collection values, enabling XSS

Type: advisorySources: OSV

LeafKit is a templating language with Swift-inspired syntax. Prior to version 1.14.2, HTML escaping doesn't work correctly when a template prints a collection (Array / Dictionary) via `#(value)`. This can result in XSS, allowing potentially untrusted input to be rendered unescaped. Version 1.14.2 fixes the issue.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-28499
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 01:59 UTC · Revision 1

Source evidence

LeafKit's HTML escaping may be skipped for Collection values, enabling XSS

core-osv · Original source

Published 18 Mar 2026, 01:19 UTC

LeafKit is a templating language with Swift-inspired syntax. Prior to version 1.14.2, HTML escaping doesn't work correctly when a template prints a collection (Array / Dictionary) via `#(value)`. This can result in XSS, allowing potentially untrusted input to be rendered unescaped. Version 1.14.2 fixes the issue.

osv:CVE-2026-28499
Complete source record
{
  "id": "5ef57bfb3c3a9409208605590e9388f71a50966adc752cafc11091f29c2f065e",
  "url": "https://osv.dev/vulnerability/CVE-2026-28499",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "LeafKit's HTML escaping may be skipped for Collection values, enabling XSS",
    "summary": "LeafKit is a templating language with Swift-inspired syntax. Prior to version 1.14.2, HTML escaping doesn't work correctly when a template prints a collection (Array / Dictionary) via `#(value)`. This can result in XSS, allowing potentially untrusted input to be rendered unescaped. Version 1.14.2 fixes the issue.",
    "evidence": "osv:CVE-2026-28499",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-28499",
      "aliases": [
        "CVE-2026-28499",
        "GHSA-6jj5-j4j8-8473"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/vapor/leaf-kit",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6044b844caa858a0c5f2505ac166f5a057c990dc"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.14.2"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "6044b844caa858a0c5f2505ac166f5a057c990dc"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "6044b844caa858a0c5f2505ac166f5a057c990dc"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "1.14.2"
                  },
                  {
                    "cpe": "cpe:2.3:a:vapor:leafkit:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.14.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.14.1",
            "1.14.0",
            "1.13.1",
            "1.13.0",
            "1.12.0",
            "1.11.1",
            "1.11.0",
            "1.10.6",
            "1.10.5",
            "1.10.4",
            "1.10.3",
            "1.10.2",
            "1.10.1",
            "1.10.0",
            "1.9.0",
            "1.8.0",
            "1.7.0",
            "1.6.0",
            "1.5.0",
            "1.4.0",
            "1.3.1",
            "1.3.0",
            "1.2.0",
            "1.1.0",
            "1.0.0",
            "1.0.0-zeta.1",
            "1.0.0-tau.1.1",
            "1.0.0-tau.1",
            "1.0.0-rc.1.17",
            "1.0.0-rc.1.16",
            "1.0.0-rc.1.15",
            "1.0.0-rc.1.14",
            "1.0.0-rc.1.13",
            "1.0.0-rc.1.12",
            "1.0.0-rc.1.11",
            "1.0.0-rc.1.10",
            "1.0.0-rc.1.9",
            "1.0.0-rc.1.8",
            "1.0.0-rc.1.7",
            "1.0.0-rc.1.6",
            "1.0.0-rc.1.5",
            "1.0.0-rc.1.4",
            "1.0.0-rc.1.3",
            "1.0.0-rc.1.2",
            "1.0.0-rc.1.1",
            "1.0.0-rc.1",
            "1.0.0-beta.2.2",
            "1.0.0-beta.2.1",
            "1.0.0-beta.2",
            "1.0.0-alpha.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-28499.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.620242449Z",
      "provider": "osv",
      "references": [
        "https://github.com/vapor/leaf-kit/releases/tag/1.14.2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28499.json",
        "https://github.com/vapor/leaf-kit/security/advisories/GHSA-6jj5-j4j8-8473",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-28499",
        "https://github.com/vapor/leaf-kit/commit/6044b844caa858a0c5f2505ac166f5a057c990dc"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-116",
          "CWE-79",
          "CWE-80"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28499.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-28499",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 499522,
  "published_at": "2026-03-18T01:19:36.122+00:00"
}