Vulnerability · Published Dec 22, 2021 · Assigned by GitHub_M
CVE-2021-37706Potential integer underflow upon receiving STUN message in PJSIP
High 7.3
In plain English
A high-severity security flaw in pjproject from pjsip. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 4.9% (higher than 92% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In affected versions if the incoming STUN message contains an ERROR-CODE attribute, the header length is not checked before performing a subtraction operation, potentially resulting in an integer underflow scenario. This issue affects all users that use STUN. A malicious actor located within the victim’s network may forge and send a specially crafted UDP (STUN) message that could remotely execute arbitrary code on the victim’s machine. Users are advised to upgrade as soon as possible. There are no known workarounds.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | pjproject | 2.12-r0 | ALPINE-CVE-2021-37706 |
| Alpine:v3.21 | pjproject | 2.12-r0 | ALPINE-CVE-2021-37706 |
| Alpine:v3.22 | pjproject | 2.12-r0 | ALPINE-CVE-2021-37706 |
| Alpine:v3.23 | pjproject | 2.12-r0 | ALPINE-CVE-2021-37706 |
| Alpine:v3.24 | pjproject | 2.12-r0 | ALPINE-CVE-2021-37706 |
| Debian:14 | asterisk | 1:18.10.1~dfsg+~cs6.10.40431411-1 | DEBIAN-CVE-2021-37706 |
| Debian:12 | ring | 20230206.0~ds1-1 | DEBIAN-CVE-2021-37706 |
Affected products (as reported)
Weakness: CWE-191 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
References
- https://github.com/pjsip/pjproject/security/advisories/GHSA-2qpg-f6wf-w984
- https://github.com/pjsip/pjproject/commit/15663e3f37091069b8c98a7fce680dc04bc8e865
- 20220304 AST-2022-004: pjproject: integer underflow on STUN message mailing-list
- http://packetstormsecurity.com/files/166225/Asterisk-Project-Security-Advisory-AST-2022-004.html
- [debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security update mailing-list
- GLSA-202210-37 vendor-advisory
- [debian-lts-announce] 20221117 [SECURITY] [DLA 3194-1] asterisk security update mailing-list
- DSA-5285 vendor-advisory
- [debian-lts-announce] 20230829 [SECURITY] [DLA 3549-1] ring security update mailing-list
- https://lists.debian.org/debian-lts-announce/2024/09/msg00030.html