PT-2021-21749 · Leafkit · Leafkit

0Xtim

+1

·

Published

2021-08-09

·

Updated

2023-06-09

·

CVE-2021-37634

CVSS v3.1

7.4

High

VectorAV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
Name of the Vulnerable Software and Affected Versions Leafkit versions prior to 1.3.0
Description Leafkit is a templating language with Swift-inspired syntax. The issue affects anyone passing unsanitised data to Leaf's variable tags. Before the 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 Cross-site Scripting (XSS) attacks if other mitigations such as a Content Security Policy were not enabled.
Recommendations For versions prior to 1.3.0, update to version 1.3.0 to resolve the issue. As a temporary workaround, sanitize any untrusted input before passing it to Leaf and enable a Content Security Policy to block inline script and CSS data.

Fix

XSS

Weakness Enumeration

Related Identifiers

CVE-2021-37634
GHSA-RV3X-XQ3R-8J9H

Affected Products

Leafkit