// For flags

CVE-2021-37634

LeafKit allows XSS with untrusted user input

Severity Score

6.1
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

Leafkit is a templating language with Swift-inspired syntax. Versions prior to 1.3.0 are susceptible to Cross-site Scripting (XSS) attacks. This affects anyone passing unsanitised data to Leaf's variable tags. Before this fix, Leaf would not escape any strings passed to tags as variables. If an attacker managed to find a variable that was rendered with their unsanitised data, they could inject scripts into a generated Leaf page, which could enable XSS attacks if other mitigations such as a Content Security Policy were not enabled. This has been patched in 1.3.0. As a workaround sanitize any untrusted input before passing it to Leaf and enable a CSP to block inline script and CSS data.

Leafkit es un lenguaje de plantillas con una sintaxis inspirada en Swift. Las versiones anteriores a 1.3.0, son susceptibles de sufrir ataques de tipo Cross-site Scripting (XSS). Esto afecta a cualquiera que pase datos no saneados a las etiquetas variables de Leaf. Antes de esta corrección, Leaf no escapaba las cadenas pasadas a las etiquetas como variables. Si un atacante lograba encontrar una variable que se presentara con sus datos no saneados, podía inyectar scripts en una página de Leaf generada, que podía permitir ataques de tipo XSS si no se habilitaban otras mitigaciones como una Política de Seguridad de Contenidos. Esto ha sido parcheado en versión 1.3.0. Como solución, sanear cualquier entrada no confiable antes de pasarla a Leaf y habilitar una CSP para bloquear los datos de script y CSS en línea

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Network
Attack Complexity
Medium
Authentication
None
Confidentiality
None
Integrity
Partial
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2021-07-29 CVE Reserved
  • 2021-08-09 CVE Published
  • 2024-04-24 EPSS Updated
  • 2024-08-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Vapor
Search vendor "Vapor"
Leafkit
Search vendor "Vapor" for product "Leafkit"
< 1.3.0
Search vendor "Vapor" for product "Leafkit" and version " < 1.3.0"
-
Affected