CVE-2021-37706 | Potential integer underflow upon receiving STUN message in PJSIP

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.

Published: 2021-12-22 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-37706 is rated High Risk (65/100): CVSS High severity, with high exploitation likelihood (EPSS 4.62%, 90th percentile). Core evidence: EPSS ranks this CVE among the most likely to be exploited in the near term. EPSS rose +4.12% over the last day, indicating growing attacker interest. Mandatory action: High exploitation likelihood—assess exposure and prioritize remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2021-37706

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.51% 4.62% +4.12%
2 2026-05-18 0.24% 0.51% +0.26%
3 2026-04-16 0.24%

Full EPSS history (30 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-37706

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.3 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
3.9 3.4 [email protected]
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]
9.3 2.0 HIGH
AV:N/AC:M/Au:N/C:C/I:C/A:C Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:C)
Complete confidentiality impact.
Integrity impact (I:C)
Complete integrity impact.
Availability impact (A:C)
Complete availability impact.
8.6 10.0 [email protected]

Weakness enumeration for CVE-2021-37706

OS Trackers for CVE-2021-37706

vendor priority summary link
alpine CVE-2021-37706: 1 source package rows (pjproject); 7 state rows across 7 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 7, open 0. https://security.alpinelinux.org/vuln/CVE-2021-37706
debian not yet assigned CVE-2021-37706 not yet assigned priority: Debian including 2 source packages (asterisk, ring), 4 status rows across 3 suites (bookworm, bullseye, sid): resolved 4. https://security-tracker.debian.org/tracker/CVE-2021-37706
gentoo normal CVE-2021-37706: 1 GLSA(s) (202210-37), 1 atom(s) (net-libs/pjproject); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-37706
ubuntu medium CVE-2021-37706 medium priority: Ubuntu including 2 source packages (pjproject, ring), 16 status rows across 12 suites (bionic, focal, impish, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): released 7, DNE 4, ignored 4, needs-triage 1. https://ubuntu.com/security/CVE-2021-37706

Affected software / configurations for CVE-2021-37706

Vendor Product Version Raw CPE
teluu pjsip <= 2.11.1 cpe:2.3:a:teluu:pjsip:*:*:*:*:*:*:*:*
asterisk certified_asterisk < 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:*:*:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:*:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert1:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert10:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert11:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert12:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert2:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert3:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert4:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert5:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert6:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert7:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert8:*:*:*:*:*:*
asterisk certified_asterisk 16.8.0 cpe:2.3:a:asterisk:certified_asterisk:16.8.0:cert9:*:*:*:*:*:*
sangoma asterisk >= 16.0.0, < 16.24.1 cpe:2.3:a:sangoma:asterisk:*:*:*:*:*:*:*:*
sangoma asterisk >= 18.0.0, < 18.10.1 cpe:2.3:a:sangoma:asterisk:*:*:*:*:*:*:*:*
sangoma asterisk >= 19.0.0, < 19.2.1 cpe:2.3:a:sangoma:asterisk:*:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*

References for CVE-2021-37706

URL Tags
http://packetstormsecurity.com/files/166225/Asterisk-Project-Security-Advisory-AST-2022-004.html Third Party Advisory VDB Entry
http://seclists.org/fulldisclosure/2022/Mar/0 Mailing List Patch Third Party Advisory
https://github.com/pjsip/pjproject/commit/15663e3f37091069b8c98a7fce680dc04bc8e865 Patch Third Party Advisory
https://github.com/pjsip/pjproject/security/advisories/GHSA-2qpg-f6wf-w984 Patch Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html Mailing List Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/11/msg00021.html Mailing List Third Party Advisory
https://lists.debian.org/debian-lts-announce/2023/08/msg00038.html
https://security.gentoo.org/glsa/202210-37 Third Party Advisory
https://www.debian.org/security/2022/dsa-5285 Third Party Advisory
https://lists.debian.org/debian-lts-announce/2024/09/msg00030.html
cvelogic Threat Intelligence