CVE-2021-37706

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-37706
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-37706.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-37706
Downstream
Related
Published
2021-12-22T18:15:07Z
Modified
2025-10-14T18:34:37.001702Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/asterisk/asterisk

Affected ranges

Type
GIT
Repo
https://github.com/asterisk/asterisk
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Type
GIT
Repo
https://github.com/pjsip/pjproject
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

16.*

16.8.0-rc1
16.8.0-rc2

2.*

2.10
2.11

Database specific

{
    "vanir_signatures": [
        {
            "signature_version": "v1",
            "signature_type": "Line",
            "target": {
                "file": "pjnath/src/pjnath/stun_msg.c"
            },
            "id": "CVE-2021-37706-6c9a95f2",
            "digest": {
                "line_hashes": [
                    "286375471227338908900759340395951320869",
                    "337170165584158815641361604078421931103",
                    "218425442522531084557250897674746904437",
                    "215575948014480304126719586812745130850"
                ],
                "threshold": 0.9
            },
            "deprecated": false,
            "source": "https://github.com/pjsip/pjproject/commit/15663e3f37091069b8c98a7fce680dc04bc8e865"
        },
        {
            "signature_version": "v1",
            "signature_type": "Function",
            "target": {
                "file": "pjnath/src/pjnath/stun_msg.c",
                "function": "decode_errcode_attr"
            },
            "id": "CVE-2021-37706-9e426c0f",
            "digest": {
                "length": 452.0,
                "function_hash": "166111760674862860056573304105766004106"
            },
            "deprecated": false,
            "source": "https://github.com/pjsip/pjproject/commit/15663e3f37091069b8c98a7fce680dc04bc8e865"
        }
    ]
}