CVE-2021-37706

Potential integer underflow upon receiving STUN message in PJSIP

Published Dec 22, 2021 CVSS 3.1 · 7.3 High EPSS 4.9% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2962-1 pjproject security update
Debian DLA Debian DLA DLA-3194-1 asterisk security update
Debian DLA Debian DLA DLA-3549-1 ring security update
Debian DLA Debian DLA DLA-3887-1 ring security update
Debian DSA Debian DSA DSA-5285-1 asterisk security update
EUVD EUVD EUVD-2021-24195 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.
Ubuntu USN Ubuntu USN USN-6422-1 Ring vulnerabilities
Ubuntu USN Ubuntu USN USN-6422-2 Ring vulnerabilities
Ubuntu USN Ubuntu USN USN-8122-1 PJSIP vulnerabilities
Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 4, 2025, 4:09 PM
Reserved
Jul 29, 2021, 12:00 AM
Status
Modified
Published
Dec 22, 2021, 6:15 PM
Modified
Jun 17, 2026, 4:01 AM