Packages / @supabase/auth-js / Security
auth-js Vulnerable to Insecure Path Routing from Malformed User Input
Affected releases · @supabase/auth-js
- 2.x2.61.0 – 2.69.1Fixed in 2.70.0
On 2.x, the newest line:
npm install @supabase/auth-js@2.70.0Every release on a timeline
Affected
2.61.0 – 2.69.1
23 releases
Fixed
2.70.0 – 2.119.2
104 releases, latest
What happens
Impact
The library functions getUserById, deleteUser, updateUserById, listFactors and deleteFactor did not require the user supplied values to be valid UUIDs. This could lead to a URL path traversal, resulting in the wrong API function being called.
Implementations that follow security best practice and validate user controlled inputs, such as the userId are not affected by this.
Patches
Strict value checks have been added to all affected functions. These functions now require that the userId and factorId parameters MUST be valid UUID (v4).
Patched version: >= 2.69.1
Workarounds
Implementations that follow security best practice and validate user controlled inputs, such as the userId are not affected by this. It is recommended that users of the auth-js library always follow security best practice and validate all inputs, before passing these to other functions or libraries.
References
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.