CVE-2019-18790 - Missing Authorization

Severity

65%

Complexity

39%

Confidentiality

41%

An issue was discovered in channels/chan_sip.c in Sangoma Asterisk 13.x, 16.x, and 17.x, and Certified Asterisk 13.21, because of an incomplete fix for CVE-2019-18351. A SIP request can be sent to Asterisk that can change a SIP peer's IP address. A REGISTER does not need to occur, and calls can be hijacked as a result. The only thing that needs to be known is the peer's name; authentication details such as passwords do not need to be known. This vulnerability is only exploitable when the nat option is set to the default, or auto_force_rport.

An issue was discovered in channels/chan_sip.c in Sangoma Asterisk 13.x, 16.x, and 17.x, and Certified Asterisk 13.21, because of an incomplete fix for CVE-2019-18351. A SIP request can be sent to Asterisk that can change a SIP peer's IP address. A REGISTER does not need to occur, and calls can be hijacked as a result. The only thing that needs to be known is the peer's name; authentication details such as passwords do not need to be known. This vulnerability is only exploitable when the nat option is set to the default, or auto_force_rport.

CVSS 3.1 Base Score 6.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).

CVSS 2.0 Base Score 5.8. CVSS Attack Vector: network. CVSS Attack Complexity: medium. CVSS Vector: (AV:N/AC:M/Au:N/C:P/I:P/A:N).

Demo Examples

Missing Authorization

CWE-862

This function runs an arbitrary SQL query on a given database, returning the result of the query.


               
$employeeRecord = runEmployeeQuery('EmployeeDB',$_GET['EmployeeName']);
return $preparedStatement->fetchAll();//Use a prepared statement to avoid CWE-89
/.../

While this code is careful to avoid SQL Injection, the function does not confirm the user sending the query is authorized to do so. An attacker may be able to obtain sensitive employee information from the database.

Missing Authorization

CWE-862

The following program could be part of a bulletin board system that allows users to send private messages to each other. This program intends to authenticate the user before deciding whether a private message should be displayed. Assume that LookupMessageObject() ensures that the $id argument is numeric, constructs a filename based on that id, and reads the message details from that file. Also assume that the program stores all private messages for all users in the same directory.


               
DisplayPrivateMessage($id);
print "Body: " . encodeHTML($Message->{body}) . "\n";
# For purposes of this example, assume that CWE-309 and# CWE-523 do not apply.
ExitError("invalid username or password");

While the program properly exits if authentication fails, it does not ensure that the message is addressed to the user. As a result, an authenticated attacker could provide any arbitrary identifier and read private messages that were intended for other users.

One way to avoid this problem would be to ensure that the "to" field in the message object matches the username of the authenticated user.

Overview

First reported 5 years ago

2019-11-22 17:15:00

Last updated 5 years ago

2019-12-04 15:09:00

Affected Software

Digium Certified Asterisk 13.21.0

13.21.0

Digium Certified Asterisk 13.21.0 Cert1

13.21.0

Digium Certified Asterisk 13.21.0 Cert2

13.21.0

Digium Certified Asterisk 13.21.0 Cert3

13.21.0

Digium Certified Asterisk 13.21.0 Cert4

13.21.0

Digium Certified Asterisk 13.21.0 Release Candidate 1

13.21.0

Debian Linux 8.0 (Jessie)

8.0

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.