CVE-2022-2523: Cross-site Scripting (XSS) in fava

fava Updated 02 Oct 2025

Summary

25/07/2022
Yes i
Moderate
6.1

CVE-2022-2523: Cross-site Scripting (XSS) - Reflected in GitHub repository beancount/fava prior to 1.22.2. Affects fava across 2 version ranges.

< 1.22.2 < dccfb6a2f4567f35ce2e9a78e24f92ebf946bc9b

Fixed in dccfb6a2f4567f35ce2e9a78e24f92ebf946bc9b. How to fix ↓

Also tracked for

The same CVE-2022-2523 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Fava is a Python package available on PyPI that provides a web interface for the Beancount accounting tool. It allows users to visualize and interact with their financial data. The vulnerability identified as CVE-2022-2523 is a Cross-site Scripting (XSS) issue that affects versions of fava prior to 1.22.2.

Vulnerability Detail

The XSS vulnerability in fava allows an attacker to inject malicious scripts into the web application, which are then executed by the victim's browser. This can lead to various security risks, such as unauthorized access to sensitive information, session hijacking, or the spread of malware. The vulnerability originates from improper input sanitization, allowing user-supplied data to be rendered as HTML without proper escaping or validation.

How To Fix

Minimum fixed version

dccfb6a2f4567f35ce2e9a78e24f92ebf946bc9b

This is the first release that contains the fix.

pip install --upgrade "fava==dccfb6a2f4567f35ce2e9a78e24f92ebf946bc9b"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, users can implement a temporary workaround by disabling user-generated HTML rendering in the fava configuration. This can be achieved by setting the BEANCOUNT_WEB_OPTIONS configuration option to {'render_commas': False}. However, this workaround may limit certain features or functionalities of the web interface.

Conclusion

In conclusion, the CVE-2022-2523 vulnerability in fava exposes users to the risk of cross-site scripting attacks. It is crucial to upgrade to fava version 1.22.2 or later to mitigate this vulnerability. If you require further assistance or support in addressing this vulnerability, please reach out to DevNack.com.

See every vulnerability recorded for fava →

Share this vulnerability

FAQ

The XSS vulnerability in fava can allow an attacker to execute arbitrary scripts in the context of the victim's browser, potentially leading to unauthorized access, data theft, or other malicious activities.

No, only versions of fava prior to 1.22.2 are affected. It is recommended to upgrade to the latest version to ensure the vulnerability is addressed.

At the time of this advisory, there are no known public exploits targeting this specific vulnerability. However, it is important to promptly apply the recommended fixes to mitigate any potential risks.

No, a CVSS score has not been assigned to this vulnerability at the time of this advisory.

You can find more information about this vulnerability in the official advisory published by the Python Package Advisory Database. The advisory can be accessed at: https://github.com/pypa/advisory-database/blob/main/vulns/fava/PYSEC-2022-240.yaml

Related vulnerabilities

Recent vulnerabilities recorded for fava.

How To Fix

Minimum fixed version

dccfb6a2f4567f35ce2e9a78e24f92ebf946bc9b

This is the first release that contains the fix.

pip install --upgrade "fava==dccfb6a2f4567f35ce2e9a78e24f92ebf946bc9b"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback