{"id":"CVE-2023-49799","aliases":["EUVD-2023-3089","GHSA-3wfp-253j-5jxv"],"status":"published","title":"Server-Side Request Forgery in nuxt-api-party","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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00819,"percentile":0.5746,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-918"],"published":"2023-12-08T23:45:18Z","modified":"2026-10-28T02:30:50Z","fixes":[{"ecosystem":"npm","package":"nuxt-api-party","fixed_in":["0.22.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"nuxt-api-party","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0"}]}]},{"source":"osv","ecosystem":"npm","package":"nuxt-api-party","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.22.0"}]}]}],"products":[{"vendor":"johannschopplich","product":"nuxt-api-party"},{"vendor":"johannschopplich","product":"nuxt_api_party"}],"references":[{"url":"https://github.com/johannschopplich/nuxt-api-party/security/advisories/GHSA-3wfp-253j-5jxv","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Mitigation","Vendor Advisory","advisory","web"]},{"url":"https://fetch.spec.whatwg.org/","tags":["x_refsource_MISC","x_transferred","Not Applicable","web"]},{"url":"https://fetch.spec.whatwg.org/#http-whitespace-byte","tags":["x_refsource_MISC","x_transferred","Not Applicable","web"]},{"url":"https://github.com/johannschopplich/nuxt-api-party/blob/777462e1e3af1d9f8938aa33f230cd8cb6e0cc9a/src/runtime/server/handler.ts#L31","tags":["x_refsource_MISC","x_transferred","Issue Tracking","web"]},{"url":"https://infra.spec.whatwg.org/#byte-sequence","tags":["x_refsource_MISC","x_transferred","Not Applicable","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49799","tags":["advisory"]},{"url":"https://github.com/johannschopplich/nuxt-api-party/commit/72762a200fc19d997a0f84bce578c28698dc5270","tags":["web"]},{"url":"https://github.com/advisories/GHSA-3wfp-253j-5jxv"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/49xxx/CVE-2023-49799.json","tags":["advisory"]},{"url":"https://fetch.spec.whatwg.org","tags":["web"]},{"url":"https://github.com/johannschopplich/nuxt-api-party","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2023-49799","title":"Server-Side Request Forgery in nuxt-api-party","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.","status":"published","published":"2023-12-08T23:45:18.581Z","modified":"2024-11-27T15:52:46.493Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"cna"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T14:35:12.998024Z"}],"euvd":[{"id":"EUVD-2023-3089","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.","status":"published","published":"2023-12-08T23:45:18Z","modified":"2024-11-27T15:52:46Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-03T00:04:45.657538Z"}],"ghsa":[{"id":"GHSA-3wfp-253j-5jxv","title":"SSRF \u0026 Credentials Leak ","description":"### Summary\n`nuxt-api-party` allows developers to proxy requests to an API without exposing credentials to the client. [A previous vulnerability](https://huntr.dev/bounties/4c57a3f6-0d0e-4431-9494-4a1e7b062fbf/) allowed an attacker to change the baseURL of the request, potentially leading to credentials being leaked or SSRF. \n\nThis vulnerability is similar, and was caused by a recent change to the detection of absolute URLs, which is no longer sufficient to prevent SSRF. \n\n### Details\n`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 a regular expression](https://github.com/johannschopplich/nuxt-api-party/blob/777462e1e3af1d9f8938aa33f230cd8cb6e0cc9a/src/runtime/server/handler.ts#L31) `^https?://`.\n\nThis regular expression can be bypassed by an absolute URL with leading whitespace. For example `\\nhttps://whatever.com` has a leading newline. \n\nAccording to the fetch specification, before a fetch is made the URL is normalized. \"To normalize a [byte sequence](https://infra.spec.whatwg.org/#byte-sequence) potentialValue, remove any leading and trailing [HTTP whitespace bytes](https://fetch.spec.whatwg.org/#http-whitespace-byte) from potentialValue.\" ([source](https://fetch.spec.whatwg.org/))\n\nThis means the final request will be normalized to `https://whatever.com`. We have bypassed the check and `nuxt-api-party` will send a request outside of the whitelist. \n\nThis could allow us to leak credentials or perform SSRF.\n\n### PoC\nPOC using Node.\n\n```js\nawait fetch(\"/api/__api_party/MyEndpoint\", {\n    method: \"POST\",\n    body: JSON.stringify({ path: \"\\nhttps://google.com\" }),\n    headers: { \"Content-Type\": \"application/json\" }\n})\n```\n\nWe can use `__proto__` as a substitute for the endpoint if it is not known. This will not leak any credentials as all attributes on `endpoint` will be undefined.\n```js\nawait fetch(\"/api/__api_party/__proto__\", {\n    method: \"POST\",\n    body: JSON.stringify({ path: \"\\nhttps://google.com\" }),\n    headers: { \"Content-Type\": \"application/json\" }\n})\n```\n\n### Impact\nLeak of sensitive API credentials. SSRF.\n\n\n### Fix\nRevert to the previous method of detecting absolute URLs.\n```js\n  if (new URL(path, 'http://localhost').origin !== 'http://localhost') {\n      // ...\n  }\n```\n","status":"published","published":"2023-12-12T00:49:44Z","modified":"2023-12-12T00:49:47Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T14:37:25.311671Z"}],"nvd":[{"id":"CVE-2023-49799","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.","status":"published","published":"2023-12-09T00:15:07.393Z","modified":"2026-06-17T06:36:29.377Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"primary"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T14:08:54.010507Z"}],"osv":[{"id":"CVE-2023-49799","title":"Server-Side Request Forgery in nuxt-api-party","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.","status":"published","published":"2023-12-08T23:45:18.581Z","modified":"2026-10-28T02:30:50.825007144Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T15:44:34.72355Z"},{"id":"GHSA-3wfp-253j-5jxv","title":"SSRF \u0026 Credentials Leak ","description":"### Summary\n`nuxt-api-party` allows developers to proxy requests to an API without exposing credentials to the client. [A previous vulnerability](https://huntr.dev/bounties/4c57a3f6-0d0e-4431-9494-4a1e7b062fbf/) allowed an attacker to change the baseURL of the request, potentially leading to credentials being leaked or SSRF. \n\nThis vulnerability is similar, and was caused by a recent change to the detection of absolute URLs, which is no longer sufficient to prevent SSRF. \n\n### Details\n`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 a regular expression](https://github.com/johannschopplich/nuxt-api-party/blob/777462e1e3af1d9f8938aa33f230cd8cb6e0cc9a/src/runtime/server/handler.ts#L31) `^https?://`.\n\nThis regular expression can be bypassed by an absolute URL with leading whitespace. For example `\\nhttps://whatever.com` has a leading newline. \n\nAccording to the fetch specification, before a fetch is made the URL is normalized. \"To normalize a [byte sequence](https://infra.spec.whatwg.org/#byte-sequence) potentialValue, remove any leading and trailing [HTTP whitespace bytes](https://fetch.spec.whatwg.org/#http-whitespace-byte) from potentialValue.\" ([source](https://fetch.spec.whatwg.org/))\n\nThis means the final request will be normalized to `https://whatever.com`. We have bypassed the check and `nuxt-api-party` will send a request outside of the whitelist. \n\nThis could allow us to leak credentials or perform SSRF.\n\n### PoC\nPOC using Node.\n\n```js\nawait fetch(\"/api/__api_party/MyEndpoint\", {\n    method: \"POST\",\n    body: JSON.stringify({ path: \"\\nhttps://google.com\" }),\n    headers: { \"Content-Type\": \"application/json\" }\n})\n```\n\nWe can use `__proto__` as a substitute for the endpoint if it is not known. This will not leak any credentials as all attributes on `endpoint` will be undefined.\n```js\nawait fetch(\"/api/__api_party/__proto__\", {\n    method: \"POST\",\n    body: JSON.stringify({ path: \"\\nhttps://google.com\" }),\n    headers: { \"Content-Type\": \"application/json\" }\n})\n```\n\n### Impact\nLeak of sensitive API credentials. SSRF.\n\n\n### Fix\nRevert to the previous method of detecting absolute URLs.\n```js\n  if (new URL(path, 'http://localhost').origin !== 'http://localhost') {\n      // ...\n  }\n```\n","status":"published","published":"2023-12-12T00:49:44Z","modified":"2026-09-10T03:49:59.222385719Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T15:46:36.092962Z"}]}}
