Junglewise Threat Intelligence

CVE-2023-49799: johannschopplich nuxt-api-party SSRF and credential leak via URL bypass

CVE-2023-49799 · Severity: low · CVSS 3.1 · Published 2023-12-12

Vendors: npm.

Executive brief

nuxt-api-party is a tool used by developers to securely connect web applications to backend APIs without exposing sensitive credentials to users. A flaw in how the tool validates web addresses allows an attacker to bypass security checks by adding hidden characters (like a new line) to a URL. This could allow an attacker to trick the server into sending sensitive API keys to a server they control or making unauthorized requests to internal systems.

Technical details

The nuxt-api-party module fails to properly validate absolute URLs due to a flawed regular expression check (^https?://). An attacker can bypass this check by prepending whitespace characters, such as a newline (\n), to a URL. Because the underlying 'fetch' implementation normalizes URLs by stripping leading whitespace before execution, the bypass results in a request to an arbitrary external destination. This allows for Server-Side Request Forgery (SSRF) and the potential leakage of proxied API credentials to attacker-controlled endpoints. The vulnerability was introduced by a change in URL detection logic and is fixed in version 0.22.0 by using a more robust URL origin check.

Affected products

  • johannschopplich nuxt-api-party < 0.22.0

Timeline

  • 2023-12-08: advisory: Original GitHub security advisory published
  • 2023-12-08: patched: Fix committed to repository
  • 2023-12-12: disclosed: Public disclosure via GHSA and OSV

References

Related threats