CVE-2026-28499 LeafKit's HTML escaping may be skipped for Collection values, enabling XSS

Medium 6.9 Published Updated

Attackers can inject malicious scripts via unescaped collection values in LeafKit templates, leading to cross-site scripting attacks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-28499?

CVE-2026-28499 is a medium-severity cross-site scripting vulnerability in vapor leaf-kit, published on 18 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-80, CWE-79, CWE-116

Which versions are affected by CVE-2026-28499?

2 open source packages ship an affected version, including github.com/vapor/leaf-kit. It affects 1 product.

PackageAffectedFixed in
github.com/vapor/leaf-kit SwiftURLAll versions1.14.2
github.com/vapor/leaf-kit SwiftURLAll versions1.14.2

Products include Vapor Leafkit.

How do I fix CVE-2026-28499?

Upgrade github.com/vapor/leaf-kit to 1.14.2 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-28499 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-28499 exists.

Sources

Also known as GHSA-6jj5-j4j8-8473.

Is CVE-2026-28499 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free