CVE-2021-37634

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-37634
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-37634.json
Aliases
Published
2021-08-09T20:15:07Z
Modified
2024-05-14T09:03:26.543622Z
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/vapor/leaf-kit

Affected ranges

Type
GIT
Repo
https://github.com/vapor/leaf-kit
Events
Introduced
0The exact introduced commit is unknown
Fixed

Affected versions

1.*

1.0.0
1.0.0-alpha.1
1.0.0-beta.2
1.0.0-beta.2.1
1.0.0-beta.2.2
1.0.0-rc.1
1.0.0-rc.1.1
1.0.0-rc.1.10
1.0.0-rc.1.11
1.0.0-rc.1.12
1.0.0-rc.1.13
1.0.0-rc.1.14
1.0.0-rc.1.15
1.0.0-rc.1.16
1.0.0-rc.1.17
1.0.0-rc.1.2
1.0.0-rc.1.3
1.0.0-rc.1.4
1.0.0-rc.1.5
1.0.0-rc.1.6
1.0.0-rc.1.7
1.0.0-rc.1.8
1.0.0-rc.1.9
1.0.0-tau.1
1.0.0-tau.1.1
1.0.0-zeta.1
1.1.0
1.2.0