CVE-2021-37706 json
Potential integer underflow upon receiving STUN message in PJSIP
published 2021-12-22 4 y ago modified 2026-06-17 4 mo ago also EUVD-2021-24195
- cvss
- 7.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 4.9%
- EPSS 4.9% chance of exploitation in 30 days, percentile 92%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- asterisk certified_asterisk 16.8.0
- sangoma asterisk 16.24.1, 18.10.1, 19.2.1
- ring Debian 12 20230206.0~ds1-1
- asterisk Debian 14 1:18.10.1~dfsg+~cs6.10.40431411-1
debian advisories DEBIAN-CVE-2021-37706
- ring Ubuntu 20.04 LTS 20190215.1.f152c98~ds1-1+deb10u2build0.20.04.1
- ring Ubuntu Pro 18.04 LTS 20180228.1.503da2b~ds1-1ubuntu0.1~esm1
- pjproject Ubuntu Pro 16.04 LTS 2.1.0.0.ast20130823-1+deb8u1ubuntu0.1~esm1
- pjproject Ubuntu Pro 18.04 LTS 2.7.2~dfsg-1ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2021-37706
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- pjproject Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 2.12-r0
alpine advisories ALPINE-CVE-2021-37706
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-37706 updated cvss 7.3
pjproject: Header length is not checked in STUN message ERROR-CODE attribute
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
4.92% chance of exploitation in the next 30 days, higher than 92% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 9.3 | AV:N/AC:M/Au:N/C:C/I:C/A:C |
Affected products
- pjsip pjproject
Classification
- Weakness
-
- CWE-191 Integer Underflow (Wrap or Wraparound)
References
-
github.com
/pjsip/pjproject/commit/15663e3f37091069b8c98a7fce680dc04bc8e865
patch, third-party-advisory
-
github.com
/pjsip/pjproject/security/advisories/GHSA-2qpg-f6wf-w984
patch, third-party-advisory
-
seclists.org
/fulldisclosure/2022/Mar/0
mailing-list, patch, third-party-advisory
-
security.gentoo.org
/glsa/202210-37
vendor-advisory, third-party-advisory
-
debian.org
/security/2022/dsa-5285
vendor-advisory, third-party-advisory
-
packetstormsecurity.com
/files/166225/Asterisk-Project-Security-Advisory-AST-2022-004.html
third-party-advisory, vdb-entry
-
lists.debian.org
/debian-lts-announce/2022/03/msg00035.html
mailing-list, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2022/11/msg00021.html
mailing-list, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2023/08/msg00038.html
mailing-list
- lists.debian.org /debian-lts-announce/2024/09/msg00030.html
Sources
- CVE List CVE-2021-37706
- NVD CVE-2021-37706
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.