# CVE-2024-52598: 2FAuth vulnerable to Server Side Request Forgery + URI validation bypass in 2fauth /api/v1/twofaccounts/preview

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.59%, higher than 49% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-11-20T14:09:45.400Z
- Modified: 2026-06-17T08:07:31.453Z
- Weaknesses: CWE-79, CWE-80, CWE-918
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

2FAuth is a web app to manage Two-Factor Authentication (2FA) accounts and generate their security codes. Two interconnected vulnerabilities exist in version 5.4.1 a SSRF and URI validation bypass issue. The endpoint at POST /api/v1/twofaccounts/preview allows setting a remote URI to retrieve the image of a 2fa site. By abusing this functionality, it is possible to force the application to make a GET request to an arbitrary URL, whose content will be stored in an image file in the server if it looks like an image. Additionally, the library does some basic validation on the URI, attempting to filter our URIs which do not have an image extension. However, this can be easily bypassed by appending the string `#.svg` to the URI. The combination of these two issues allows an attacker to retrieve URIs accessible from the application, as long as their content type is text based. If not, the request is still sent, but the response is not reflected to the attacker. Version 5.4.1 fixes the issues.

(As written by CVE List.)

## Affected

- Bubka 2FAuth: < 5.4.1; before 5.4.1
- 2fauth 2fauth: before 5.4.1

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/Bubka/2FAuth/security/advisories/GHSA-xwxc-w7v3-2p4j> (exploit, vendor-advisory)

## Sources

- CVE List: [CVE-2024-52598](https://www.cve.org/CVERecord?id=CVE-2024-52598), CVE Terms of Use, modified 2024-11-20
- NVD: [CVE-2024-52598](https://nvd.nist.gov/vuln/detail/CVE-2024-52598), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-52598 · Whole record: https://cve.day/CVE-2024-52598.json · Rebuilt by cve.day 2026-11-25T22:58:48.893Z
