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

Published Nov 20, 2024
·
Updated

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.

Affected Software

2 affected components
2FAuth 2FAuth
2FAuth 2FAuth<5.4.1

Event History

Nov 20, 2024
CVE Published
via MITRE·02:09 PM
Data Sourced
via MITRE·02:09 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:15 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-52598?

CVE-2024-52598 is considered a high severity vulnerability due to its potential for SSRF and URI validation bypass exploits.

2

How do I fix CVE-2024-52598?

To fix CVE-2024-52598, update to the latest version of 2FAuth that addresses these vulnerabilities.

3

What are the main vulnerabilities associated with CVE-2024-52598?

CVE-2024-52598 involves a Server-Side Request Forgery (SSRF) and a URI validation bypass issue.

4

Which versions of 2FAuth are affected by CVE-2024-52598?

CVE-2024-52598 affects version 5.4.1 of the 2FAuth web application.

5

Can CVE-2024-52598 lead to unauthorized access?

Yes, CVE-2024-52598 can potentially allow an attacker to exploit the vulnerabilities for unauthorized access.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203