The vulnerability advisory points to an issue in the auth0/laravel-auth0 SDK related to improper file path validation during bulk user imports. The fixing commit for laravel-auth0 only updates the version of its dependency, auth0/auth0-php, indicating the actual vulnerability lies within the auth0/auth0-php package.
By comparing the git tags of auth0/auth0-php between the last vulnerable version (8.16.0) and the first patched version (8.17.0), I identified the security patch commit 9026da58f5c381cd4cb5932de829eff6eacbb65c. This commit reveals changes in two key files: src/Utility/HttpRequest.php and src/Utility/Assert.php.
The root cause of the vulnerability is in the Auth0\SDK\Utility\HttpRequest::addFile method. Before the patch, this method would accept any string as a file path without validation. This is dangerous because PHP's file functions can handle URLs and special stream wrappers, not just local file paths. An attacker could exploit this by providing a payload like php://filter/convert.base64-encode/resource=/etc/passwd to read sensitive files from the server.
The fix consists of two main changes:
- The
Auth0\SDK\Utility\HttpRequest::addFile method was updated to call Assert::fileExists() and Assert::readable() on the provided path before using it.
- The
Auth0\SDK\Utility\Assert::fileExists method was strengthened to reject any path that includes a protocol separator (://), effectively blocking the use of stream wrappers and remote URLs.
Both functions are included in the analysis. HttpRequest::addFile is the primary vulnerable function where the untrusted input is handled. Assert::fileExists represents the insufficient security control that was bypassed. A runtime profiler would show HttpRequest::addFile in the stack trace during exploitation.