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

Critical 9.8 Published Updated

A stack buffer overflow in PJSIP's STUN client allows attackers to execute arbitrary code or cause denial of service when STUN is enabled.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-31031?

CVE-2022-31031 is a critical memory corruption vulnerability in Debian Debian Linux, published on 7 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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 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.

Weakness: CWE-787, CWE-120

Which versions are affected by CVE-2022-31031?

It affects 2 products.

Products include Debian Debian Linux, Teluu Pjsip.

How do I fix CVE-2022-31031?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2022-31031 being exploited?

There is no known exploitation of CVE-2022-31031 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2022-31031, DEBIAN-CVE-2022-31031, GHSA-26j7-ww69-c4qj, UBUNTU-CVE-2022-31031.

Is CVE-2022-31031 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free