-
Notifications
You must be signed in to change notification settings - Fork 80
CSRF Vulnerability in axios via [email protected] and Loopback-Connector-MSSQL #250
Copy link
Copy link
Open
Labels
Description
Steps to reproduce
- Use the
[email protected]package with[email protected], which in turn uses[email protected]. - This package relies on
[email protected], which is affected by a CSRF vulnerability. - Enable
withCredentialssetting, and if theX-XSRF-TOKENheader is inserted using the secretXSRF-TOKENcookie value, CSRF vulnerability is triggered.
Current Behavior
The vulnerability is introduced through the dependency chain:
[email protected] > [email protected] > [email protected] > [email protected] > @azure/[email protected] > [email protected] > [email protected].
When the XSRF-TOKEN cookie is available and withCredentials is enabled, the X-XSRF-TOKEN header is automatically sent in requests to the server. This can potentially bypass CSRF protections if an attacker manages to obtain this token.
Expected Behavior
- The package
mssqlshould be updated to11.0.1or a version that resolves the CSRF vulnerability. - There should be an update to
axiosto address the CSRF issue by improving the handling ofX-XSRF-TOKENandXSRF-TOKENcookies.
Link to reproduction sandbox
N/A
Additional information
node -e 'console.log(process.platform, process.arch, process.versions.node)'
Output:<platform info>npm ls --prod --depth 0 | grep loopback
Output:<dependency tree info>
Related Issues
No related issues found.
Note: The issue is related to the CSRF vulnerability in [email protected]. The fix would require an update to the mssql dependency to resolve the security issue introduced by axios.
diegonc
