CVE-2021-37634
CVSS V2 Medium 4.3
CVSS V3 Medium 6.1
Description
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.
Overview
- CVE ID
- CVE-2021-37634
- Assigner
- security-advisories@github.com
- Vulnerability Status
- Analyzed
- Published Version
- 2021-08-09T20:15:07
- Last Modified Date
- 2021-08-16T20:54:04
Weakness Enumerations
CPE Configuration (Product)
CPE | Vulnerable | Operator | Version Start | Version End |
---|---|---|---|---|
cpe:2.3:a:vapor:leafkit:*:*:*:*:*:*:*:* | 1 | OR | 1.3.0 |
CVSS Version 2
- Version
- 2.0
- Vector String
- AV:N/AC:M/Au:N/C:N/I:P/A:N
- Access Vector
- NETWORK
- Access Compatibility
- MEDIUM
- Authentication
- NONE
- Confidentiality Impact
- NONE
- Integrity Impact
- PARTIAL
- Availability Impact
- NONE
- Base Score
- 4.3
- Severity
- MEDIUM
- Exploitability Score
- 8.6
- Impact Score
- 2.9
CVSS Version 3
- Version
- 3.1
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector
- NETWORK
- Attack Compatibility
- LOW
- Privileges Required
- NONE
- User Interaction
- REQUIRED
- Scope
- CHANGED
- Confidentiality Impact
- LOW
- Availability Impact
- NONE
- Base Score
- 6.1
- Base Severity
- MEDIUM
- Exploitability Score
- 2.8
- Impact Score
- 2.7
References
Reference URL | Reference Tags |
---|---|
https://github.com/vapor/leaf-kit-ghsa-rv3x-xq3r-8j9h/pull/1 | Broken Link |
https://github.com/vapor/leaf-kit/security/advisories/GHSA-rv3x-xq3r-8j9h | Third Party Advisory |
Sources
Source Name | Source URL |
---|---|
NIST | https://nvd.nist.gov/vuln/detail/CVE-2021-37634 |
MITRE | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-37634 |
History
Created | Old Value | New Value | Data Type | Notes |
---|---|---|---|---|
2022-05-10 06:57:01 | Added to TrackCVE | |||
2022-12-05 07:45:10 | 2021-08-09T20:15Z | 2021-08-09T20:15:07 | CVE Published Date | updated |
2022-12-05 07:45:10 | 2021-08-16T20:54:04 | CVE Modified Date | updated | |
2022-12-05 07:45:10 | Analyzed | Vulnerability Status | updated |