Security mailing lists by PureSourceCode

CVE-2021-37634

MEDIUM 6.1CVSS 3.1

LeafKit allows XSS with untrusted user input

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.

Published
9 Aug 2021
Last modified
8 Jul 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-79CWE-80
Also known as
GHSA-rv3x-xq3r-8j9h
Sources
NVDJSONOSV GHSA-rv3x-xq3r-8j9hJSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 7.4 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD nvd@nist.gov (Primary) CVSS 2.0 MEDIUM 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD vapor leafkit
cpe:2.3:a:vapor:leafkit:*:*:*:*:*:*:*:*
< 1.3.0 1.3.0
OSV SwiftURL github.com/vapor/leaf-kit < 1.3.0 1.3.0

References

History

  • 25 Nov 2026 20:33 UTC · NVD: first stored (published 9 Aug 2021)
  • 25 Nov 2026 20:15 UTC · OSV: first stored (published 9 Jun 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.