CVE-2021-37706
Potential integer underflow upon receiving STUN message in PJSIP
- State
- Published
- Severity
- 7.3 High
- Published
- Dec 22, 2021
- Updated
- Nov 4, 2025
- Reserved
- Jul 29, 2021
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 7.3 High | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L | GitHub_M |
Weaknesses
- CWE-191 Integer Underflow (Wrap or Wraparound)
Affected Products
| Product | Versions |
|---|---|
pjprojectpjsip |
|
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 messagemailing-list
- http://packetstormsecurity.com/files/166225/Asterisk-Project-Security-Advisory-AST-2022-004.html
- [debian-lts-announce] 20220328 [SECURITY] [DLA 2962-1] pjproject security updatemailing-list
- GLSA-202210-37vendor-advisory
- [debian-lts-announce] 20221117 [SECURITY] [DLA 3194-1] asterisk security updatemailing-list
- DSA-5285vendor-advisory
- [debian-lts-announce] 20230829 [SECURITY] [DLA 3549-1] ring security updatemailing-list
- https://lists.debian.org/debian-lts-announce/2024/09/msg00030.html
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.