Skip to main content
Vulnerability Database/CVE-2025-47778

CVE-2025-47778: Sulu CMS XXE Vulnerability

CVE-2025-47778 is an XML External Entity flaw in Sulu CMS that allows admin users to upload malicious SVG files, potentially exposing sensitive data. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-47778 Overview

Sulu is an open-source PHP content management system (CMS) built on the Symfony framework. CVE-2025-47778 is an XML External Entity (XXE) vulnerability [CWE-611] affecting Sulu versions 2.5.21, 2.6.5, and 3.0.0-alpha1 onward. An authenticated admin user can upload a crafted Scalable Vector Graphics (SVG) file that is parsed by the XML DOM library without disabling external entity resolution. The parser then loads attacker-controlled external data, enabling XXE exploitation. Sulu patched the issue in versions 2.6.9, 2.5.25, and 3.0.0-alpha3.

Critical Impact

Authenticated admin users can trigger XXE processing in SvgFileInspector, exposing local files and enabling server-side request forgery against internal services.

Affected Products

  • Sulu CMS versions 2.5.21 through 2.5.24
  • Sulu CMS versions 2.6.5 through 2.6.8
  • Sulu CMS versions 3.0.0-alpha1 through 3.0.0-alpha2

Discovery Timeline

  • 2025-05-14 - CVE-2025-47778 published to the National Vulnerability Database (NVD)
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-47778

Vulnerability Analysis

The vulnerability resides in src/Sulu/Bundle/MediaBundle/FileInspector/SvgFileInspector.php. Sulu's media bundle inspects uploaded SVG files by parsing them as XML. The parser configuration does not disable external entity resolution, so document type definitions (DTDs) and external entity references in the SVG payload are processed by the underlying XML DOM library.

An authenticated administrator uploads an SVG that declares an external entity referencing a local file or remote URL. When the inspector parses the file, the XML library resolves the entity and returns its contents, which an attacker can exfiltrate or use to probe internal network resources. The impact includes local file disclosure, server-side request forgery (SSRF) against internal services, and in some PHP configurations, denial of service through entity expansion.

Root Cause

The root cause is the absence of secure XML parser flags. PHP's libxml must be instructed to disable entity loading via libxml_disable_entity_loader(true) (on older PHP) or by omitting the LIBXML_NOENT and LIBXML_DTDLOAD flags on DOMDocument::load(). The pre-patch SvgFileInspector loaded SVG content with default parser settings that honored external entities.

Attack Vector

Exploitation requires high privileges (admin-level access to the Sulu administration interface) and network access to the upload endpoint. The attacker crafts an SVG containing an XML DOCTYPE declaration with an external entity pointing to a sensitive local file or an internal HTTP endpoint. The attacker uploads the file through the media management interface. When the inspector processes the file, the entity resolves and the data is incorporated into parsed output or triggers an outbound request.

For technical details on the patched parser configuration, see the GitHub Commit Change and the GitHub Security Advisory GHSA-f6rx-hf55-4255.

Detection Methods for CVE-2025-47778

Indicators of Compromise

  • Uploaded SVG files containing <!DOCTYPE> declarations or <!ENTITY> references, particularly with SYSTEM identifiers pointing to file://, http://, or php:// URIs.
  • Unexpected outbound HTTP, FTP, or DNS requests originating from the Sulu web server shortly after media uploads.
  • Web server access logs showing SVG uploads to media bundle endpoints by admin accounts followed by anomalous file reads.

Detection Strategies

  • Inspect stored SVG media assets for DTD declarations using static scanning tools; legitimate SVGs rarely require external entities.
  • Correlate admin-authenticated media upload events with subsequent outbound connections from the PHP-FPM or web server process.
  • Monitor PHP error logs for libxml warnings related to entity resolution or external DTD retrieval failures.

Monitoring Recommendations

  • Enable audit logging for media uploads performed by administrative accounts and review for SVG uploads from unexpected sources.
  • Deploy egress filtering and alert on outbound requests from the web server to internal metadata services (for example, 169.254.169.254) or arbitrary external hosts.
  • Track the installed Sulu version across environments and flag deployments that remain on 2.5.21–2.5.24, 2.6.5–2.6.8, or 3.0.0-alpha1/alpha2.

How to Mitigate CVE-2025-47778

Immediate Actions Required

  • Upgrade Sulu to version 2.6.9, 2.5.25, or 3.0.0-alpha3 or later as published in the vendor advisory.
  • Audit administrator accounts and rotate credentials for any accounts suspected of compromise.
  • Review stored SVG media uploaded since the vulnerable version was deployed and remove any containing DTDs or external entity references.

Patch Information

The fix is implemented in GitHub Commit 02f52fca04eb9495b9b4a0c5cc64cf23bc27f544, which hardens SvgFileInspector.php against XXE by disabling external entity resolution during SVG parsing. See the current implementation at the GitHub SVG File Inspector.

Workarounds

  • Manually patch src/Sulu/Bundle/MediaBundle/FileInspector/SvgFileInspector.php with the upstream changes if an immediate upgrade is not feasible.
  • Restrict administrator access to the media bundle until the patch is applied and enforce multi-factor authentication for admin accounts.
  • Block SVG uploads at the web application firewall or application layer until the fix is deployed.
bash
# Upgrade Sulu via Composer to a patched release
composer require sulu/sulu:^2.6.9
# or for the 2.5 branch
composer require sulu/sulu:^2.5.25
# Clear Symfony caches after upgrade
php bin/console cache:clear --env=prod

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.