CVE-2022-1631: Incorrect Authorization (CWE-863)
value: Users Account Pre-Takeover or Users Account Takeover. in GitHub repository microweber/microweber prior to 1.2.15. Victim Account Take Over. Since, there is no email confirmation, an attacker can easily create an account in the application using the Victim’s Email. This allows an attacker to gain pre-authentication to the victim’s account. Further, due to the lack of proper validation of email coming from Social Login and failing to check if an account already exists, the victim will not identify if an account is already existing. Hence, the attacker’s persistence will remain. An attacker would be able to see all the activities performed by the victim user impacting the confidentiality and attempt to modify/corrupt the data impacting the integrity and availability factor. This attack becomes more interesting when an attacker can register an account from an employee’s email address. Assuming the organization uses G-Suite, it is much more impactful to hijack into an employee’s account.
CWE description: The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
CVSS v3 base score: 8.8
Published: 2022-05-09T14:15Z
Repository: https://github.com/microweber/microweber
Language: PHP
Files changed: src/MicroweberPackages/Shop/resources/views/index.blade.php
Commit date: 2022-05-09 15:54:29 +0300
Commit message: Update index.blade.php

Diff: diff --git a/src/MicroweberPackages/Shop/resources/views/index.blade.php b/src/MicroweberPackages/Shop/resources/views/index.blade.php
index bfdeb89dacde..d7a0036ecdc1 100644
--- a/src/MicroweberPackages/Shop/resources/views/index.blade.php
+++ b/src/MicroweberPackages/Shop/resources/views/index.blade.php
@@ -44,13 +44,15 @@
                         <p>{{$product->content_text}}</p>
 
                         <div class="d-flex">
                             <p class="col-6 mb-0">
                                 @if($product->hasSpecialPrice())
-                                    <span class="price-old"><?php print currency_format($product->specialPrice); ?></span>
+                                    <span class="price-old"><?php print currency_format($product->price); ?></span>
+                                    <span class="money"><?php print currency_format($product->specialPrice); ?></span>
+                                @else
+                                    <span class="money"><?php print currency_format($product->price); ?></span>
                                 @endif
-                                <span class="money"><?php print currency_format($product->price); ?></span>
                             </p>
 
                             <a class="col-6 text-end text-right align-self-center" href="{{content_link($product->id)}}"> View</a>
                         </div>
 

Vulnerable code:                                     <span class="price-old"><?php print currency_format($product->specialPrice); ?></span>
                                <span class="money"><?php print currency_format($product->price); ?></span>
Fixed code:                                     <span class="price-old"><?php print currency_format($product->price); ?></span>
                                    <span class="money"><?php print currency_format($product->specialPrice); ?></span>
                                @else
                                    <span class="money"><?php print currency_format($product->price); ?></span>