Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2021-21276: Merge pull request from GHSA-vg6w-8w9v-xxqc · cydrobolt/polr@b198170

Polr is an open source URL shortener. in Polr before version 2.3.0, a vulnerability in the setup process allows attackers to gain admin access to site instances, even if they do not possess an existing account. This vulnerability exists regardless of users’ settings. If an attacker crafts a request with specific cookie headers to the /setup/finish endpoint, they may be able to obtain admin privileges on the instance. This is caused by a loose comparison (==) in SetupController that is susceptible to attack. The project has been patched to ensure that a strict comparison (===) is used to verify the setup key, and that /setup/finish verifies that no users table exists before performing any migrations or provisioning any new accounts. This is fixed in version 2.3.0. Users can patch this vulnerability without upgrading by adding abort(404) to the very first line of finishSetup in SetupController.php.

CVE
#vulnerability#js#php#auth

@@ -3,6 +3,7 @@ use Illuminate\Http\Request; use Illuminate\Http\Redirect; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Schema;
use App\Helpers\CryptoHelper; use App\Models\User; @@ -218,8 +219,8 @@ public static function performSetup(Request $request) { }
public static function finishSetup(Request $request) { // get data from cookie, decode JSON if (!isset($_COOKIE[‘setup_arguments’])) { // Abort if setup arguments are missing. abort(404); }
@@ -229,12 +230,19 @@ public static function finishSetup(Request $request) { // unset cookie setcookie('setup_arguments’, '’, time()-3600);
$transaction_authorised = env(‘TMP_SETUP_AUTH_KEY’) == $setup_finish_args->setup_auth_key; $transaction_authorised = env(‘TMP_SETUP_AUTH_KEY’) === $setup_finish_args->setup_auth_key;
if ($transaction_authorised != true) { abort(403, ‘Transaction unauthorised.’); }
$usersTableExists = Schema::hasTable(‘users’);
if ($usersTableExists) { // If the users table exists, then the setup process may have already been completed before. abort(403, ‘Setup has been completed already.’); }
$database_created = self::createDatabase(); if (!$database_created) { return redirect(route(‘setup’))->with('error’, ‘Could not create database. Perhaps your credentials were incorrect?’);

Related news

POLR URL 2.3.0 Shortener Admin Takeover

POLR URL version 2.3.0 suffers from an administrative takeover vulnerability.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907