On some servers, a visitor could change the environment Laravel uses for a request by adding a crafted query string to a URL. Laravel checked command-line arguments when it detected the environment, and with PHP's register_argc_argv setting on, a web request's query string ends up in those arguments.
Who is affected
Apps where the register_argc_argv ini setting is On for the PHP that serves web requests (PHP-FPM, mod_php and so on). Check it in a web request with ini_get('register_argc_argv'), not on the command line. If it's Off, you're not exposed. What an attacker gains depends on what your app does differently per environment, such as code behind App::environment() checks.
Affected releases of laravel/framework are below 6.20.45, 7.x below 7.30.7, 8.x below 8.83.28, 9.x below 9.52.17, 10.x below 10.48.23, and 11.x below 11.31.0.
What to do
Update to the fixed release for your branch: 6.20.45, 7.30.7, 8.83.28, 9.52.17, 10.48.23 or 11.31.0. After the fix, Laravel ignores argv values for environment detection outside the command line. See Laravel's advisory.