CVE-2026-27120 Details
Description
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.
A vulnerability in the Leafkit templating language, prior to version 1.4.1, allows for improper HTML escaping of special characters. The issue arises because the 'htmlEscaped' function only escapes characters if the extended grapheme clusters match. This flaw can be exploited by using a cluster that combines a special HTML character with additional characters, bypassing the escape mechanism. In the context of HTML attributes, this could lead to Cross-Site Scripting (XSS) if a Leaf variable containing user-controlled data is included in the attribute.
Users can upgrade to Leafkit version 1.4.1 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 24, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/vapor/leaf-kit/commit/8919e39476c3a4ba05c28b71546bb9195f87ef34 | [email protected] | Patch |
| https://github.com/vapor/leaf-kit/security/advisories/GHSA-4hfh-fch3-5q7p | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-75 | Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) | [email protected] |
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
| CWE-87 | Improper Neutralization of Alternate XSS Syntax | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| vapor leafkit | < 1.14.1 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 2, 2026 | Initial Analysis | [email protected] |
| Feb 20, 2026 | New CVE Received | [email protected] |