CVE-2021-37706: Potential integer underflow upon receiving STUN message in PJSIP
CVE-2021-37706 affects 66 listed versions of Sangoma Asterisk in the Dawnsentry catalogue.
Affected products and versions
The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.
Sangoma Asterisk
66 of 250 listed versions are affected. Fixed in 19.2.1, 18.10.1, 16.24.1. The newest release, 24.0.0, is not affected.
19.2.0 19.1.0 19.0.0 18.10.0 18.9.0 18.9-cert17 18.9-cert14 18.9-cert12 18.9-cert11 18.9-cert6 18.9-cert5 18.8.0 18.7.1 18.7.0 18.6.0 18.5.1 18.5.0 18.4.0 18.3.0 18.2.2 18.2.1 18.2.0 18.1.1 18.1.0 18.0.1 18.0.0 16.24.0 16.23.0 16.22.0 16.21.1 16.21.0 16.20.0 16.19.1 16.19.0 16.18.0 16.17.0 16.16.2 16.16.1 16.16.0 16.15.1 16.15.0 16.14.1 16.14.0 16.13.0 16.12.0 16.11.1 16.11.0 16.10.0 16.9.0 16.8.0 16.7.0 16.6.2 16.6.1 16.6.0 16.5.1 16.5.0 16.4.1 16.4.0 16.3.0 16.2.1 and 6 more
What it is
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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD)
Published by GitHub on 22 December 2021. Last changed 17 June 2026.
Sources
Check one version you run: look CVE-2021-37706 up, or pick a product and version in the quick lookup.
Updated 2 December 2026.