Executive brief
PJSIP is a multimedia communication library used by many applications to handle audio and video over the internet. A defect in its HTTP client can cause a memory corruption flaw when downloading large files from a web server. An attacker posing as a malicious web server could craft responses to crash applications or potentially execute code, affecting availability and security of systems relying on this library.
Technical details
A heap buffer overflow exists in the PJLIB-UTIL HTTP client (http_client.c) due to incorrect size calculation when buffering HTTP response bodies. The vulnerability occurs when an application receives the entire response body in a completion callback without using incremental on_data_read callbacks. When the server sends a body larger than twice the initially allocated buffer size (based on a potentially attacker-controlled Content-Length header), a single doubling of the buffer is insufficient, causing response data to be written past the end of the heap allocation. The flaw requires a network-reachable HTTP server; applications using incremental response streaming or connecting only to trusted servers are unaffected. Impact ranges from denial of service (application termination) to memory corruption. The patch is available in commit 8d5956a, which implements repeated buffer doubling until the buffer is large enough.
Affected products
- PJSIP pjproject 2.17 or lower
Timeline
- 2026-06-17: disclosed
- 2026-09-04: patched: patch available in commit 8d5956a