SecurityContext

CVE-2024-52598: 2FAuth - Server Side Request Forgery

  • Cve: CVE-2024-52598
  • Name: 2FAuth - Server Side Request Forgery
  • 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.
  • Impact: Attackers can make the server fetch arbitrary internal or external URLs, potentially leading to information disclosure or server-side request manipulation.
  • Remediation: Update to version 5.4.2 or later to fix the vulnerabilities.
  • Vulnerability type: server_side_request_forgery
  • Vulnerability impact: information_disclosure
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.5
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Epss score: 0.00588
  • Epss percentile: 0.48805
  • Assignee: [email protected]
  • Published at: 2024-11-20T15:15:11Z
  • Age in days: 734
  • Modified at: 2026-06-17T08:07:31Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 1
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-52598
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-79Improper Neutralization of Input During Web Page Generation
CWE-918Server-Side Request Forgery

Public exploits

UrlSourceAdded date
https://github.com/Bubka/2FAuth/security/advisories/GHSA-xwxc-w7v3-2p4jnvd2024-11-20

References

UrlSourceTags
https://github.com/Bubka/2FAuth/security/advisories/GHSA-xwxc-w7v3-2p4jnvdExploit, Vendor Advisory

Products

ProductAffectedPlatform boundSourcesUrl
2fauth:2fauth< 5.4.1nonvd/v1/products/2fauth/2fauth

Projects

RepositoryLink kindsIndexedUrl
Bubka/2FAuthsecurity_advisoryyes/v1/repositories/Bubka/2FAuth

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2024-11-20
  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts