/

CVE-2026-45771

Severity:

HIGH RISK

(7.5)

XML Entity Expansion (CWE-776) in FreeSWITCH Parser

CVE-2026-45771

Analyzed

Vulnerability type

Category:

XML External Entity Expansion

CWE:

CWE-776

Impact:

Denial of Service via Resource Exhaustion

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

FreeSWITCH's bundled XML parser expands nested <!ENTITY> declarations without any depth or count limits, enabling a "billion laughs" style entity expansion attack.

An unauthenticated network attacker can send a crafted SIP PUBLISH request whose PIDF body triggers unbounded CPU and memory consumption during XML parsing.

Affected context

The vulnerability occurs in FreeSWITCH deployments that parse XML bodies using the bundled XML parser, particularly when handling PIDF content from SIP PUBLISH requests.

It is relevant where the server accepts and processes XML payloads from the network and feeds them to the XML parser before performing integrity checks, authentication validation, or resource limits.

Environments that expose SIP interfaces to untrusted or semi-trusted networks are most at risk, especially when the FreeSWITCH process shares resources with other critical services.

Exploit preconditions

  • Attack surface: SIP interface receiving PUBLISH requests containing PIDF XML bodies.
  • Required access: Network reachability to the FreeSWITCH SIP service; no prior authentication or valid credentials are required.
  • Trigger point: Submission of a single SIP PUBLISH request whose PIDF body contains deeply nested or recursively defined XML entities.
  • Why exploitation is possible: The XML parser recursively expands internal entities without enforcing bounds on depth or total expansions, allowing attacker-supplied XML to grow exponentially in memory and CPU usage.

Why this happens

This issue stems from unbounded expansion of nested XML entities in the bundled XML parser.

The parser accepts internal <!ENTITY> declarations and recursively expands them without limits on recursion depth, number of expansions, or overall output size.

This behavior aligns with CWE-776: Improper Restriction of Recursive Entity References in DTDs ("Billion Laughs"), where untrusted XML input can cause exponential resource consumption during parsing.

Conceptually, the parser treats attacker-controlled XML as trusted structural input, failing to impose defensive constraints or disable features that are unnecessary for typical application logic.

Potential impact

  • FreeSWITCH process can consume excessive CPU, leading to degraded call handling and signaling performance.
  • Memory exhaustion on the host running FreeSWITCH, potentially causing process crashes or system instability.
  • Denial of service for legitimate VoIP traffic, including dropped calls and inability to establish new sessions.
  • Potential cascading impact on co-located services sharing the same system resources.

General mitigation guidance

Mitigation generally centers on hardening XML parsing behavior and minimizing trust in externally supplied XML content.

Defensive patterns include:

  • Disabling or strictly limiting XML entity expansion features that are not required by the application.
  • Configuring the XML parser with maximum depth, node count, and overall expansion size limits.
  • Treating all inbound XML from the network as untrusted, validating size and structure before parsing.
  • Isolating the FreeSWITCH process with resource controls (e.g., per-process CPU and memory limits) to reduce blast radius in case of malformed input.
  • Applying least-privilege principles for the telephony service and avoiding co-location with unrelated critical workloads on the same host.

How teams detect issues like this

Detection typically involves observing parser usage patterns and runtime behavior under load.

Practical strategies include:

  • Static analysis or code review to identify XML parsers that allow entity declarations without explicit configuration of limits or feature restrictions.
  • Reviewing configuration and initialization code for XML parsing, checking for disabled DTD/entity processing and defined resource bounds.
  • Monitoring runtime metrics such as CPU spikes, memory usage, and abnormal SIP PUBLISH patterns indicating potential abuse.
  • Implementing network-level anomaly detection to flag unusually large or structurally complex PIDF or other XML payloads.

Sources

SourceLink
github.comgithub.com/signalwire/freeswitch/releases/tag/v1.11.0
github.comgithub.com/signalwire/freeswitch/security/advisories/GHSA-5vjg-pv56-vg4c

Frequently asked

questions

Yes. An attacker who can send SIP PUBLISH requests to the FreeSWITCH instance can remotely trigger the vulnerability using a crafted XML PIDF body.

No. Exploitation does not depend on authentication, because the malicious XML is parsed before any digest or authentication checks are applied to the SIP request.

The safest pattern is to disable XML entity expansion when it is not explicitly needed, and configure strict parser limits on recursion depth, entity count, and document size whenever XML from untrusted sources must be accepted.

Use hardened XML parsing configurations by default, avoid unnecessary DTD or entity processing features, enforce input size and complexity limits at the network edge, and incorporate security-focused reviews of parser configurations into development and deployment pipelines.

Find out what's already
exploitable in your codebase.