Summary
An XML External Entity (XXE) injection vulnerability in Vvveb's admin Tools/Import feature allows authenticated site_admin users to abuse the XML parser configuration in system/import/xml.php to resolve external entities.
By injecting file:// or php://filter entity references, an attacker can read arbitrary files on the server and persist malicious data into the database, including overwriting administrator password hashes for privilege escalation.
Affected context
This issue occurs within the Vvveb administrative interface, specifically when site_admin users use the Tools/Import feature to upload and process XML data via system/import/xml.php.
The vulnerability is present when the XML parser is configured to allow external entities and access to local or stream-based URIs.
It becomes relevant in deployments where authenticated admin users or compromised admin accounts can upload crafted XML files that are parsed without sufficient entity restrictions.
Exploit preconditions
- Attack surface: Authenticated web interface (Vvveb admin Tools/Import endpoint).
- Required access: Valid site_admin account or control over a site_admin session.
- Trigger point: Submission of a crafted XML file that defines and references external entities during the import process.
- Why exploitation is possible: The XML parser in
system/import/xml.phpis configured to process external entities and permits access to file and stream handlers (e.g.,file://,php://filter), allowing attacker-controlled entity definitions to be resolved and their contents injected into application data flows.
Why this happens
The underlying issue is the use of an XML parser configuration that permits processing of external entities and access to local or stream-based resources, without restricting or disabling these capabilities for untrusted XML input.
This pattern aligns with CWE-611: Improper Restriction of XML External Entity Reference, where an application parses XML documents with external entity expansion enabled, allowing attackers to define entities that reference sensitive files or system streams.
In this case, the parsed entity content can be both disclosed and stored in the database through the import mechanism, enabling file disclosure and manipulation of critical records such as administrator credentials.
Potential impact
- Disclosure of arbitrary files accessible to the web server process, including configuration files and potentially sensitive application data.
- Exposure of database connection details or secrets if they are stored in readable configuration files.
- Overwriting or corrupting database records imported through the XML pipeline, including administrator password hashes.
- Escalation of privileges by replacing existing admin credentials, leading to full administrative control of the application.
- Facilitation of further attacks such as data tampering, user impersonation, or deployment of malicious configuration changes.
General mitigation guidance
Mitigation commonly focuses on hardening XML processing and reducing trust in uploaded content.
Useful patterns include:
- Disabling external entity resolution and DTD processing in XML parsers by default, especially for any input influenced by users.
- Using XML parsing libraries or configurations that explicitly restrict access to
file://,php://, and other external resources when processing imports. - Applying strict validation and schema enforcement on imported XML, ensuring only expected elements and attributes are accepted and stored.
- Separating import logic from sensitive operations such as credential handling, so that imported data cannot overwrite authentication records without additional checks.
- Running the application with least-privilege filesystem and database permissions so that even if XML entities are processed, the accessible data and writable tables are limited.
How teams detect issues like this
Detection strategies often combine configuration review and targeted analysis of XML handling code:
- Static analysis rules or manual code review focusing on XML parser initialization, checking for flags or options that enable external entities and DTD loading.
- Search for usage of XML libraries known to support external entities (e.g., DOM, SimpleXML, or similar) without explicit hardening, especially in import or upload handlers.
- Logging and monitoring of admin import activity, flagging unusual or malformed XML uploads or repeated imports with external entity declarations.
- Security-focused tests or fuzzing that submit XML documents containing benign external entities to verify whether they are resolved in test environments.
Automated review tools and CI checks can help enforce safe XML parser configurations and highlight reintroductions of XXE-prone patterns.

