CVE-2023-49799
Nuxt-Api-Party Newline URL Whitespace SSRF/Credentials Leaking
Description
`nuxt-api-party` is an open source module to proxy API requests. nuxt-api-party attempts to check if the user has passed an absolute URL to prevent the aforementioned attack. This has been recently changed to use the regular expression `^https?://`, however this regular expression can be bypassed by an absolute URL with leading whitespace. For example `\nhttps://whatever.com` which has a leading newline. According to the fetch specification, before a fetch is made the URL is normalized. "To normalize a byte sequence potentialValue, remove any leading and trailing HTTP whitespace bytes from potentialValue.". This means the final request will be normalized to `https://whatever.com` bypassing the check and nuxt-api-party will send a request outside of the whitelist. This could allow us to leak credentials or perform Server-Side Request Forgery (SSRF). This vulnerability has been addressed in version 0.22.1. Users are advised to upgrade. Users unable to upgrade should revert to the previous method of detecting absolute URLs.
INFO
Published Date :
Dec. 9, 2023, 12:15 a.m.
Last Modified :
Nov. 21, 2024, 8:33 a.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
3.6
Exploitability Score :
3.9
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2023-49799
.
URL | Resource |
---|---|
https://fetch.spec.whatwg.org/ | Not Applicable |
https://fetch.spec.whatwg.org/#http-whitespace-byte | Not Applicable |
https://github.com/johannschopplich/nuxt-api-party/blob/777462e1e3af1d9f8938aa33f230cd8cb6e0cc9a/src/runtime/server/handler.ts#L31 | Issue Tracking |
https://github.com/johannschopplich/nuxt-api-party/security/advisories/GHSA-3wfp-253j-5jxv | Exploit Mitigation Vendor Advisory |
https://infra.spec.whatwg.org/#byte-sequence | Not Applicable |
https://fetch.spec.whatwg.org/ | Not Applicable |
https://fetch.spec.whatwg.org/#http-whitespace-byte | Not Applicable |
https://github.com/johannschopplich/nuxt-api-party/blob/777462e1e3af1d9f8938aa33f230cd8cb6e0cc9a/src/runtime/server/handler.ts#L31 | Issue Tracking |
https://github.com/johannschopplich/nuxt-api-party/security/advisories/GHSA-3wfp-253j-5jxv | Exploit Mitigation Vendor Advisory |
https://infra.spec.whatwg.org/#byte-sequence | Not Applicable |
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2023-49799
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2023-49799
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://fetch.spec.whatwg.org/ Added Reference https://fetch.spec.whatwg.org/#http-whitespace-byte Added Reference https://github.com/johannschopplich/nuxt-api-party/blob/777462e1e3af1d9f8938aa33f230cd8cb6e0cc9a/src/runtime/server/handler.ts#L31 Added Reference https://github.com/johannschopplich/nuxt-api-party/security/advisories/GHSA-3wfp-253j-5jxv Added Reference https://infra.spec.whatwg.org/#byte-sequence -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
Initial Analysis by [email protected]
Dec. 13, 2023
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Changed Reference Type https://fetch.spec.whatwg.org/ No Types Assigned https://fetch.spec.whatwg.org/ Not Applicable Changed Reference Type https://fetch.spec.whatwg.org/#http-whitespace-byte No Types Assigned https://fetch.spec.whatwg.org/#http-whitespace-byte Not Applicable Changed Reference Type https://github.com/johannschopplich/nuxt-api-party/blob/777462e1e3af1d9f8938aa33f230cd8cb6e0cc9a/src/runtime/server/handler.ts#L31 No Types Assigned https://github.com/johannschopplich/nuxt-api-party/blob/777462e1e3af1d9f8938aa33f230cd8cb6e0cc9a/src/runtime/server/handler.ts#L31 Issue Tracking Changed Reference Type https://github.com/johannschopplich/nuxt-api-party/security/advisories/GHSA-3wfp-253j-5jxv No Types Assigned https://github.com/johannschopplich/nuxt-api-party/security/advisories/GHSA-3wfp-253j-5jxv Exploit, Mitigation, Vendor Advisory Changed Reference Type https://infra.spec.whatwg.org/#byte-sequence No Types Assigned https://infra.spec.whatwg.org/#byte-sequence Not Applicable Added CPE Configuration OR *cpe:2.3:a:johannschopplich:nuxt_api_party:*:*:*:*:*:node.js:*:* versions up to (including) 0.21.3 -
CVE Received by [email protected]
Dec. 09, 2023
Action Type Old Value New Value Added Description `nuxt-api-party` is an open source module to proxy API requests. nuxt-api-party attempts to check if the user has passed an absolute URL to prevent the aforementioned attack. This has been recently changed to use the regular expression `^https?://`, however this regular expression can be bypassed by an absolute URL with leading whitespace. For example `\nhttps://whatever.com` which has a leading newline. According to the fetch specification, before a fetch is made the URL is normalized. "To normalize a byte sequence potentialValue, remove any leading and trailing HTTP whitespace bytes from potentialValue.". This means the final request will be normalized to `https://whatever.com` bypassing the check and nuxt-api-party will send a request outside of the whitelist. This could allow us to leak credentials or perform Server-Side Request Forgery (SSRF). This vulnerability has been addressed in version 0.22.1. Users are advised to upgrade. Users unable to upgrade should revert to the previous method of detecting absolute URLs. Added Reference GitHub, Inc. https://github.com/johannschopplich/nuxt-api-party/security/advisories/GHSA-3wfp-253j-5jxv [No types assigned] Added Reference GitHub, Inc. https://fetch.spec.whatwg.org/ [No types assigned] Added Reference GitHub, Inc. https://fetch.spec.whatwg.org/#http-whitespace-byte [No types assigned] Added Reference GitHub, Inc. https://github.com/johannschopplich/nuxt-api-party/blob/777462e1e3af1d9f8938aa33f230cd8cb6e0cc9a/src/runtime/server/handler.ts#L31 [No types assigned] Added Reference GitHub, Inc. https://infra.spec.whatwg.org/#byte-sequence [No types assigned] Added CWE GitHub, Inc. CWE-918 Added CVSS V3.1 GitHub, Inc. AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2023-49799
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2023-49799
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
1.44 }} 0.33%
score
0.79726
percentile