The vulnerability is an OS command injection in the raspap-webgui software. The analysis of the patch commit f514f5a12ef0c34853b5370ef55d630b499f977d reveals that the vulnerability lies in the includes/locale.php file. The script was using a user-controllable session variable, $_SESSION['locale'], directly in a call to putenv(). An authenticated user could manipulate this session variable by sending a POST request with a crafted locale parameter. The lack of sanitization allowed for the injection of arbitrary OS commands. The patch addresses this by adding two main fixes: first, it validates the user-provided locale from the POST request against a strict allowlist; second, it uses the escapeshellarg() function to properly sanitize the value before it is passed to putenv(). The vulnerability does not reside within a specific function but in the global scope of the includes/locale.php script, which is executed when included by other pages in the application.