7.5high
Denial of service by abusing `fetchOptions.retry` in nuxt-api-party
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.89% (higher than 57% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-q6hx-3m4p-749h
Description
`nuxt-api-party` is an open source module to proxy API requests. The library allows the user to send many options directly to `ofetch`. There is no filter on which options are available. We can abuse the retry logic to cause the server to crash from a stack overflow. fetchOptions are obtained directly from the request body. A malicious user can construct a URL known to not fetch successfully, then set the retry attempts to a high value, this will cause a stack overflow as ofetch error handling works recursively resulting in a denial of service. This issue has been addressed in version 0.22.1. Users are advised to upgrade. Users unable to upgrade should limit ofetch options.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| johannschopplich nuxt-api-party | < 0.22.1 | CVE List |
| nuxt-api-party (npm) | before 0.22.1 | GitHub Advisory Database |
| johannschopplich nuxt_api_party | up to 0.21.3 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
What each source says
CVE List
`nuxt-api-party` is an open source module to proxy API requests. The library allows the user to send many options directly to `ofetch`. There is no filter on which options are available. We can abuse the retry logic to cause the server to crash from a stack overflow. fetchOptions are obtained directly from the request body. A malicious user can construct a URL known to not fetch successfully, then set the retry attempts to a high value, this will cause a stack overflow as ofetch error handling works recursively resulting in a denial of service. This issue has been addressed in version 0.22.1. Users are advised to upgrade. Users unable to upgrade should limit ofetch options.
GitHub Advisory Database
Summary
nuxt-api-party allows developers to proxy requests to an API without exposing credentials to the client. ofetch is used to send the requests.
The library allows the user to send many options directly to ofetch. There is no filter on which options are available. We can abuse the retry logic to cause the server to crash from a stack overflow.
Details
fetchOptions are obtained directly from the request body. These are then passed directly into ofetch
.
We can construct a URL we know will not fetch successfully, then set the retry attempts to a high value, this will cause a stack overflow as ofetch error handling works recursively.
PoC
POC using Node.
await fetch("http://localhost:3000/api/__api_party/MyEndpoint", {
method: "POST",
body: JSON.stringify({ path: "x:x", retry: 9999999 }),
headers: { "Content-Type": "application/json" }
})
We can use __proto__ as a substitute for the endpoint if it is not known.
await fetch("http://localhost:3000/api/__api_party/__proto__", {
method: "POST",
body: JSON.stringify({ path: "x:x", retry: 9999999 }),
headers: { "Content-Type": "application/json" }
})
We can build the size of the stack faster by using more complicated URIs
await fetch("http://localhost:3000/api/__api_party/__proto__", {
method: "POST",
body: JSON.stringify({ path: "data:x;base64,----", retry: 9999999 }),
headers: { "Content-Type": "application/json" }
})
Impact
Full DOS, server is unusable during attack. Requires a single request.
Fix
Limit which options can be passed to ofetch.
NVD (es)
`nuxt-api-party` es un módulo de código abierto para enviar solicitudes de API. La librería permite al usuario enviar muchas opciones directamente a "ofetch". No hay ningún filtro sobre qué opciones están disponibles. Podemos abusar de la lógica de reintento para provocar que el servidor falle debido a un desbordamiento de pila. fetchOptions se obtienen directamente del cuerpo de la solicitud. Un usuario malintencionado puede crear una URL que se sabe que no se recupera correctamente y luego establecer los intentos de reintento en un valor alto; esto provocará un desbordamiento de la pila, ya que el manejo de errores de recuperación funciona de forma recursiva, lo que resulta en una denegación de servicio. Este problema se solucionó en la versión 0.22.1. Se recomienda a los usuarios que actualicen. Los usuarios que no puedan actualizar deben limitar las opciones de grabado.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-49800 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-q6hx-3m4p-749h changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2023-49800 changed 2026-06-17 | Public domain |