LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31031: Potential stack buffer overflow when parsing message as a STUN client

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 versions prior to and including 2.12.1 a stack buffer overflow vulnerability affects PJSIP users that use STUN in their applications, either by: setting a STUN server in their account/media config in PJSUA/PJSUA2 level, or directly using `pjlib-util/stun_simple` API. A patch is available in commit 450baca which should be included in the next release. There are no known workarounds for this issue.

CriticalCVSS 9.8Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

PJSIP/pjproject before and including 2.12.1 can overflow stack memory when acting as a STUN client. A remote, unauthenticated network attacker could potentially crash or compromise affected communications software. The issue is critical because STUN is common in voice, video, SIP, and NAT traversal stacks.

Executive priority

Treat this as a high-priority remediation item for communications infrastructure. Focus first on internet-facing or business-critical voice/video systems, then embedded clients and bundled dependencies. The absence of confirmed exploitation in the supplied sources lowers panic, not remediation urgency.

Technical view

The advisory describes a CWE-120 stack buffer overflow in PJSIP STUN client parsing. Exposure exists when applications configure a STUN server through PJSUA/PJSUA2 account or media settings, or directly use pjlib-util/stun_simple. CVSS 3.1 is 9.8 with network attack vector, low complexity, no privileges, and no user interaction.

Likely exposure

Most likely in products or services embedding pjproject/PJSIP <= 2.12.1 for SIP, VoIP, video, Asterisk-related deployments, Ring, or custom STUN-enabled applications. Exposure requires STUN client use as described by the upstream advisory.

Exploitation context

The source bundle does not show CISA KEV listing or confirmed active exploitation. The vulnerability is still urgent because it is remotely reachable, unauthenticated, low complexity, and impacts confidentiality, integrity, and availability according to CVSS.

Researcher notes

The strongest evidence is the upstream GitHub advisory and patch commit. Distribution advisories show downstream impact across packaged software. The bundle does not provide proof-of-concept details, exploitation telemetry, or a named fixed release beyond the referenced commit.

Mitigation direction

  • Upgrade pjproject/PJSIP to a version containing commit 450baca or a vendor-fixed package.
  • Apply relevant operating system security updates from Debian, Gentoo, or other package maintainers.
  • Inventory downstream products that embed pjproject, including communications servers and desktop clients.
  • Do not assume a configuration workaround; the upstream advisory states none are known.
  • Check vendor guidance for any product-specific remediation or compensating controls.

Validation and detection

  • Identify all pjproject/PJSIP versions and flag versions <= 2.12.1.
  • Confirm whether applications configure STUN through PJSUA/PJSUA2 or use pjlib-util/stun_simple.
  • Review package changelogs or vendor advisories for the upstream fix commit.
  • Check for statically linked or bundled pjproject copies in communications applications.
  • Prioritize externally reachable SIP, VoIP, video, and NAT traversal services.
Prepared
Confidence
high
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-120: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31031 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
8Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.8CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

9.8Critical
CVSS 3.1 vector shape for CVE-2022-31031Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
pjsippjproject<= 2.12.1Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-120 · source CWE mapping

Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.