Liberal whitespace handling in chan_sip allows bypassing authentication via SIP proxy
Multiple products
At a glance
An issue was discovered in Asterisk Open Source 11.x before 11.25.1, 13.x before 13.13.1, and 14.x before 14.2.1 and Certified Asterisk 11.x before 11.6-cert16 and 13.x before 13.8-cert4. The chan_sip channel driver has a liberal definition for whitespace when attempting to strip the content between a SIP header name and a colon character. Rather than following RFC 3261 and stripping only spaces and horizontal tabs, Asterisk treats any non-printable ASCII character as if it were whitespace. This means that headers such as Contact\x01: will be seen as a valid Contact header. This mostly does not pose a problem until Asterisk is placed in tandem with an authenticating SIP proxy. In such a case, a crafty combination of valid and invalid To headers can cause a proxy to allow an INVITE request into Asterisk without authentication since it believes the request is an in-dialog request. However, because of the bug described above, the request will look like an out-of-dialog request to Asterisk. Asterisk will then process the request as a new call. The result is that Asterisk can process calls from unvetted sources without any authentication. If you do not use a proxy for authentication, then this issue does not affect you. If your proxy is dialog-aware (meaning that the proxy keeps track of what dialogs are currently valid), then this issue does not affect you. If you use chan_pjsip…
Full source description
An issue was discovered in Asterisk Open Source 11.x before 11.25.1, 13.x before 13.13.1, and 14.x before 14.2.1 and Certified Asterisk 11.x before 11.6-cert16 and 13.x before 13.8-cert4. The chan_sip channel driver has a liberal definition for whitespace when attempting to strip the content between a SIP header name and a colon character. Rather than following RFC 3261 and stripping only spaces and horizontal tabs, Asterisk treats any non-printable ASCII character as if it were whitespace. This means that headers such as Contact\x01: will be seen as a valid Contact header. This mostly does not pose a problem until Asterisk is placed in tandem with an authenticating SIP proxy. In such a case, a crafty combination of valid and invalid To headers can cause a proxy to allow an INVITE request into Asterisk without authentication since it believes the request is an in-dialog request. However, because of the bug described above, the request will look like an out-of-dialog request to Asterisk. Asterisk will then process the request as a new call. The result is that Asterisk can process calls from unvetted sources without any authentication. If you do not use a proxy for authentication, then this issue does not affect you. If your proxy is dialog-aware (meaning that the proxy keeps track of what dialogs are currently valid), then this issue does not affect you. If you use chan_pjsip instead of chan_sip, then this issue does not affect you.
Source description · CVE List / CNA
System impact
CVSS summary v3.0
- Published:
- Updated:
- EPSS:
- 3.429%
- Exploited in attacks:
- Not confirmed
- Ransomware campaigns:
- Not confirmed
- Attack vector:
- Network
Related CWE
Affected software
Vendor, product and affected version ranges.
| Vendor | Product | Affected versions |
|---|---|---|
| Vendor:digium | certified asterisk | Affected versions:11.0.0Show full version range for certified asterisk11.1.011.2.011.3.011.4.011.5.011.6.011.6
|
| Vendor:digium | asterisk | Affected versions:11.0.0Show full version range for asterisk11.0.111.0.211.1.011.1.111.1.211.10.011.10.111.10.211.11.011.12.011.12.111.13.011.13.111.14.011.14.111.14.211.15.011.15.111.16.011.17.011.17.111.18.011.19.011.2.011.2.111.2.211.20.011.21.011.21.111.21.211.22.011.23.011.23.111.24.011.24.111.25.011.3.011.4.011.5.011.5.111.6.011.6.111.7.011.8.011.8.111.9.013.0.013.0.113.0.213.1.013.1.113.10.013.11.013.11.113.11.213.12.013.12.113.12.213.13.013.2.013.2.113.3.013.3.113.3.213.4.013.5.013.6.013.7.013.7.113.7.213.8.013.8.113.8.213.9.013.9.114.0.014.0.114.0.214.1.014.1.114.1.214.2.0
|
1–2 of 2 · Page 1 of 1
CVSS scores and metrics3
[email protected] · NVD (Primary)Primary5.3 / 10MediumCVSS 3.0Details
- Attack complexity
- Low
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
- Attack vector
- Network
- Privileges required
- Not required
- User interaction
- Not required
- Scope
- Unchanged
Source vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NCVE-2016-9938 · OSV (source-vector)5.3 / 10MediumCVSS 3.0Details
- Attack complexity
- Low
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
- Attack vector
- Network
- Privileges required
- Not required
- User interaction
- Not required
- Scope
- Unchanged
Source vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N[email protected] · NVD (Primary)5.0 / 10MediumCVSS 2.0Details
- Attack complexity
- Low
- Confidentiality
- None
- Integrity
- Partial
- Availability
- None
- Attack vector
- Network
- Authentication
- Not required
Source vector
AV:N/AC:L/Au:N/C:N/I:P/A:NCVSS measures severity; EPSS estimates exploitation probability. Lack of confirmed attacks does not mean lack of risk.
Sources and advisories7
This product uses the NVD API but is not endorsed or certified by the NVD. CVE® records © The MITRE Corporation, reproduced under the CVE Terms of Use. Data sources and licences