# CVE-2026-57163: PJSIP stack buffer overflow in GnuTLS TLS backend

Source: https://junglewise.ai/threats/cve-2026-57163-pjsip-stack-buffer-overflow-in-gnutls-tls-backend  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-04. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-57163 · Severity: critical · CVSS 9.1 · Published 2026-09-04

PJSIP is an open-source multimedia communication library used for VoIP and real-time communication applications. A flaw in its GnuTLS backend allows an attacker to trigger a stack buffer overflow by presenting a crafted TLS certificate during the initial handshake, before any application-level authentication occurs. This can lead to application crashes or, in worst-case scenarios, arbitrary code execution.

Technologies: [PJSIP Pjproject](https://junglewise.ai/threats/technologies/pjproject), [Teluu Pjsip](https://junglewise.ai/threats/technologies/pjsip). Vendors: [PJSIP](https://junglewise.ai/threats/vendors/pjsip), [Teluu](https://junglewise.ai/threats/vendors/teluu).

## Quick answers

**Is CVE-2026-57163 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-57163 being exploited in the wild.

**How severe is CVE-2026-57163?** Critical severity, with a CVSS score of 9.1, published 4 September 2026.

**Which products and versions are affected?** PJSIP Pjproject 2.17 and earlier.

**Is there a fix for CVE-2026-57163?** A patch was published on 2026-09-04: commit c4a151a Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-57163 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-57163?** Check whether you run PJSIP Pjproject or Teluu Pjsip at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a stack-based buffer overflow (CWE-121) in the tls_cert_get_info() function within ssl_sock_gtls.c. The root cause is an incorrect buffer-size value (512 bytes) passed to gnutls_x509_crt_get_subject_alt_name() when the actual output buffer is only 256 bytes, causing an oversized SubjectAltName entry to overflow the stack. The attack is network-triggered during TLS handshake—a malicious server can attack a connecting client, or a malicious client can attack a server requesting certificates—requiring no prior authentication. Exploitation can result in denial of service or memory corruption leading to code execution. Only GnuTLS-compiled builds (--with-gnutls) are affected; OpenSSL and Apple SecureTransport/Network.framework backends are not vulnerable. The fix is available via commit c4a151a, which corrects the buffer-size calculation to sizeof(out) - 1 on every iteration.

## Affected products

- PJSIP PJPROJECT 2.17 and earlier

## Timeline

- 2026-09-04: disclosed
- 2026-09-04: patched: commit c4a151a

## References

- [https://github.com/pjsip/pjproject/commit/c4a151af86fadd16d9480b2603eeb2abf4fb4f78](https://github.com/pjsip/pjproject/commit/c4a151af86fadd16d9480b2603eeb2abf4fb4f78)
- [https://github.com/pjsip/pjproject/security/advisories/GHSA-jm2j-6rg6-qvwx](https://github.com/pjsip/pjproject/security/advisories/GHSA-jm2j-6rg6-qvwx)

## Related threats

- [PJSIP stack buffer overflow in telnet CLI](https://junglewise.ai/threats/cve-2026-57166-pjsip-stack-buffer-overflow-in-telnet-cli)
- [PJSIP stack buffer overflow in telnet CLI history redraw](https://junglewise.ai/threats/cve-2026-57165-pjsip-stack-buffer-overflow-in-telnet-cli-history-redraw)
- [PJSIP heap buffer overflow in HTTP client](https://junglewise.ai/threats/cve-2026-57164-pjsip-heap-buffer-overflow-in-http-client)
- [PJSIP stack buffer overflow in SRTP/SDES SDP processing](https://junglewise.ai/threats/cve-2026-57162-pjsip-stack-buffer-overflow-in-srtp-sdes-sdp-processing)
- [PJSIP stack buffer overflow in Service-Route header processing](https://junglewise.ai/threats/cve-2026-57161-pjsip-stack-buffer-overflow-in-service-route-header-processing)
