CVE-2022-2523: Fava vulnerable to Reflected Cross-site Scripting
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.53186%
CWE
Published
7/26/2022
Updated
9/20/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| fava | pip | >= 0, < 1.22.2 | 1.22.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper use of Svelte's @html directive in two locations:
- In EntryContext.svelte, directly rendering inventory data as HTML via join("<br>") without sanitization
- In Query.svelte, directly rendering error messages as HTML. Both patterns allowed user-controlled input (via query_string parameter) to be interpreted as raw HTML. The fix replaced these with safe context-aware escaping ({amount} and {error}) and explicit <br/> elements, confirming the vulnerable pattern was improper HTML injection through @html.