GHSA-RV3X-XQ3R-8J9H
Vulnerability from github – Published: 2023-06-09 19:32 – Updated: 2023-06-09 19:32
VLAI?
Summary
LeafKit allows XSS with untrusted user input
Details
Impact
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.
Patches
This has been patched in 1.3.0
Workarounds
Sanitise any untrusted input before passing it to Leaf and enable a CSP to block inline script and CSS data.
References
https://github.com/vapor/leaf-kit-ghsa-rv3x-xq3r-8j9h/pull/1
For more information
If you have any questions or comments about this advisory: * Open an issue in Leaf Kit * Email us at security@vapor.codes
{
"affected": [
{
"package": {
"ecosystem": "SwiftURL",
"name": "github.com/vapor/leaf-kit"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-37634"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-80"
],
"github_reviewed": true,
"github_reviewed_at": "2023-06-09T19:32:32Z",
"nvd_published_at": "2021-08-09T20:15:00Z",
"severity": "MODERATE"
},
"details": "### Impact\nThis affects anyone passing unsanitised data to Leaf\u0027s 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.\n\n### Patches\nThis has been patched in 1.3.0\n\n### Workarounds\nSanitise any untrusted input before passing it to Leaf and enable a CSP to block inline script and CSS data.\n\n### References\nhttps://github.com/vapor/leaf-kit-ghsa-rv3x-xq3r-8j9h/pull/1\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Leaf Kit](https://github.com/vapor/leaf-kit)\n* Email us at [security@vapor.codes](mailto:security@vapor.codes)",
"id": "GHSA-rv3x-xq3r-8j9h",
"modified": "2023-06-09T19:32:32Z",
"published": "2023-06-09T19:32:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/vapor/leaf-kit/security/advisories/GHSA-rv3x-xq3r-8j9h"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-37634"
},
{
"type": "PACKAGE",
"url": "https://github.com/vapor/leaf-kit"
},
{
"type": "WEB",
"url": "https://github.com/vapor/leaf-kit/releases/tag/1.3.0"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "LeafKit allows XSS with untrusted user input"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…