Read the docs
TI-2026-21572 Aliases CVE-2026-27120GHSA-4hfh-fch3-5q7p

Leaf-kit html escaping does not work on characters that are part of extended grapheme cluster

Priority MEDIUM 60CWE-75Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

Leafkit is a templating language with Swift-inspired syntax. Prior to 1.4.1, htmlEscaped in leaf-kit will only escape html special characters if the extended grapheme clusters match, which allows bypassing escaping by using an extended grapheme cluster containing both the special html character and some additional characters. In the case of html attributes, this can lead to XSS if there is a leaf variable in the attribute that is user controlled. This vulnerability is fixed in 1.4.1.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00266 18th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed leaf-kit (vapor): 1.4.1github.com/vapor/leaf-kit (SwiftURL): 1.4.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
vaporleaf-kitbefore 1.4.11.4.1Patch availableCNA
—github.com/vapor/leaf-kit (SwiftURL)before 1.4.11.4.1Patch availableGHSA-4hfh-fch3-5q7p
  • leaf-kit Vendorvapor Affected before 1.4.1 Fixed in 1.4.1 Patch available CNA
  • github.com/vapor/leaf-kit (SwiftURL) Vendor— Affected before 1.4.1 Fixed in 1.4.1 Patch available GHSA-4hfh-fch3-5q7p

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:vapor:leafkit:*:*:*:*:*:*:*:*before 1.14.1Vulnerablevapor
  • cpe:2.3:a:vapor:leafkit:*:*:*:*:*:*:*:* Versions before 1.14.1 Vulnerable ·vapor

Remediation

  • Fix · CNA leaf-kit (vapor) Fixed in 1.4.1
  • Fix · GHSA-4hfh-fch3-5q7p github.com/vapor/leaf-kit (SwiftURL) Fixed in 1.4.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-27120
  2. 2026-10-03 Alias added: GHSA-4hfh-fch3-5q7p

References

  • TI-2026-22762 LeafKit's HTML escaping may be skipped for Collection values, enabling XSS CVSS 4.0MEDIUM 6.9
  • TI-2021-15509 LeafKit allows XSS with untrusted user input CVSS 3.1HIGH 7.4

Sources