Skip to content

Pre-authentication heap buffer overflow in `mod_verto` HTTP POST body read.

Critical
andywolk published GHSA-wfrq-qvg2-f88f Jun 3, 2026

Package

FreeSWITCH (C)

Affected versions

<= 1.11.0

Patched versions

>= 1.11.1

Description

Summary

The mod_verto HTTP request handler allocates a fixed 2 MiB buffer for a POST application/x-www-form-urlencoded body but accepts Content-Length up to just under 10 MiB. The body-read loop is bounded by Content-Length rather than the buffer size, producing an attacker-controlled heap overflow of up to ~8 MiB -- before the HTTP basic-auth check runs.

Impact

  • Heap corruption with fully attacker-controlled contents: every byte the attacker sends past 2 MiB lands on the heap.
  • Reliable denial of service via heap corruption is trivial to trigger.
  • Possible information disclosure: depending on heap layout, the overflow may corrupt adjacent allocations whose contents are later reflected on the same connection (HTTP response or WebSocket frames).
  • RCE has not been demonstrated, but is plausible given the size of the overflow and complete attacker control over its contents.

Affected configurations

Reachable only on verto profiles with at least one <vhost> configured (the HTTP request handler is wired up only when vhosts are present). The vanilla verto.conf.xml defines its profile without <vhost> blocks and is not reachable as-is. Deployments come into scope as soon as an operator adds a <vhost> -- typically to serve files or a landing page (e.g. Verto Communicator deployments serving the web UI from the same FreeSWITCH port). Default listener ports are :8081 plaintext and :8082 TLS.

Attack prerequisites

Network reach to the verto listener. The overflow lands before HTTP basic-auth runs, so no credentials, WebSocket upgrade, JSON-RPC framing, or prior interaction are required. TLS does not mitigate: the overflow is in HTTP body parsing after the transport is terminated.

Workarounds

  • Restrict the verto listener to trusted networks (firewall / bind address).
  • Remove all <vhost> entries from the verto profile. This disables the HTTP request handler entirely and confines verto to WebSocket / JSON-RPC; files previously served via the verto vhost will no longer be reachable on the verto port.
  • Disable mod_verto outright if it is not in use.

Fix

Size the body-buffer allocation to the request's Content-Length (plus one byte for the trailing NUL) so the read loop's natural termination matches the allocation. The accepted Content-Length ceiling is unchanged; only the allocation now tracks the gate.

Credit

Adam Bedard, Security Researcher.

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2026-49841

Weaknesses

Heap-based Buffer Overflow

A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). Learn more on MITRE.

Incorrect Calculation of Buffer Size

The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow. Learn more on MITRE.

Credits