Skip to content
Fencer Intel
medium 6.1

CVE-2026-27120 json

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

published 8mo ago modified 4mo ago also EUVD-2026-7783 , GHSA-4hfh-fch3-5q7p

cvss
6.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.3%
EPSS 0.3% chance of exploitation in 30 days, percentile 18%
public exploits
0
none known

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.

Patch / fix

  • swift github.com/vapor/leaf-kit 1.4.1
  • vapor leafkit 1.4.1

Is CVE-2026-27120 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
8mo ago

Exploit prediction

0.27% chance of exploitation in the next 30 days, higher than 18% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • github.com https://github.com/vapor/leaf-kit/security/advisories/GHSA-4hfh-fch3-5q7p referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
swift github.com/vapor/leaf-kit
<1.4.1
1.4.1

Affected products

  • vapor leaf-kit

Classification

Weakness
  • CWE-75 Failure to Sanitize Special Elements into a Different Plane
  • CWE-79 Improper Neutralization of Input During Web Page Generation
  • CWE-87 Improper Neutralization of Alternate XSS Syntax

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.