CVE-2024-52598

Source
https://cve.org/CVERecord?id=CVE-2024-52598
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-52598.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-52598
Aliases
  • GHSA-xwxc-w7v3-2p4j
Published
2024-11-20T14:09:45.400Z
Modified
2026-04-10T05:12:21.835213Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
2FAuth vulnerable to Server Side Request Forgery + URI validation bypass in 2fauth /api/v1/twofaccounts/preview
Details

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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/52xxx/CVE-2024-52598.json",
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-79",
        "CWE-80",
        "CWE-918"
    ]
}
References

Affected packages

Git / github.com/bubka/2fauth

Affected ranges

Type
GIT
Repo
https://github.com/bubka/2fauth
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v1.*
v1.0.0
v1.1.0
v1.2.0
v1.3.0
v1.3.1
v2.*
v2.0.0
v2.0.1
v2.0.2
v2.1.0
v3.*
v3.0.0
v3.1.0
v3.1.1
v3.2.0
v3.3.0
v3.3.1
v3.3.2
v3.3.3
v3.4.0
v3.4.1
v4.*
v4.0.0
v4.0.0-beta.1
v4.0.1
v4.0.2
v4.1.0
v4.2.0
v4.2.1
v4.2.2
v4.2.3
v4.2.4
v5.*
v5.0.0
v5.0.1
v5.0.2
v5.0.3
v5.0.4
v5.1.0
v5.1.1
v5.2.0
v5.3.0
v5.3.1
v5.3.2
v5.4.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-52598.json"