CVE-2021-37706
JSON

7.3high

Potential integer underflow upon receiving STUN message in PJSIP

Severity
7.3high CVSS:3.1 by GitHub_M
Exploit likelihood
4.92% (higher than 92% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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.

Affected

Product or packageVersionsReported by
pjsip pjproject<= 2.11.1CVE List
teluu pjsipup to 2.11.1NVD
asterisk certified_asteriskbefore 16.8.0, 16.8.0NVD
sangoma asteriskfrom 16.0.0 before 16.24.1, from 18.0.0 before 18.10.1, from 19.0.0 before 19.2.1NVD
debian debian_linux9.0, 10.0NVD

All scores

GitHub_M7.3high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.3high CVSS:2.0AV:N/AC:M/Au:N/C:C/I:C/A:C

Classification

What each source says

CVE List

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.

NVD (es)

PJSIP es una biblioteca de comunicación multimedia gratuita y de código abierto escrita en lenguaje C que implementa protocolos basados en estándares como SIP, SDP, RTP, STUN, TURN e ICE. En las versiones afectadas, si el mensaje STUN entrante contiene un atributo ERROR-CODE, no se comprueba la longitud del encabezado antes de llevar a cabo una operación de sustracción, resultando en un escenario de desbordamiento de enteros. Este problema afecta a todos los usuarios que usan STUN. Un actor malicioso situado en la red de la víctima puede falsificar y enviar un mensaje UDP (STUN) especialmente diseñado que podría ejecutar remotamente código arbitrario en la máquina de la víctima. Se aconseja a usuarios que actualicen lo antes posible. No se presentan soluciones conocidas

References

https://github.com/pjsip/pjproject/security/advisories/GHSA-2qpg-f6wf-w984patch, third-party-advisory
https://github.com/pjsip/pjproject/commit/15663e3f37091069b8c98a7fce680dc04bc8e865patch, third-party-advisory
http://seclists.org/fulldisclosure/2022/Mar/0mailing-list, patch, third-party-advisory
http://packetstormsecurity.com/files/166225/Asterisk-Project-Security-Advisory-AST-2022-004.htmlthird-party-advisory, vdb-entry
https://lists.debian.org/debian-lts-announce/2022/03/msg00035.htmlmailing-list, third-party-advisory
https://security.gentoo.org/glsa/202210-37third-party-advisory, vendor-advisory
https://lists.debian.org/debian-lts-announce/2022/11/msg00021.htmlmailing-list, third-party-advisory
https://www.debian.org/security/2022/dsa-5285third-party-advisory, vendor-advisory
https://lists.debian.org/debian-lts-announce/2023/08/msg00038.htmlmailing-list
https://lists.debian.org/debian-lts-announce/2024/09/msg00030.html

Sources

SourceRecordLicence
CVE ListCVE-2021-37706 changed 2025-11-04CVE Terms of Use
NVDCVE-2021-37706 changed 2026-06-17Public domain