Summary
OpenRemote's Velbus asset import endpoint parses user-supplied XML without proper XXE hardening, allowing external entity resolution.
An authenticated user who can access the import endpoint may abuse XML external entities to read server-side files (up to 1023 characters) or initiate server-side request forgery (SSRF).
Affected context
This vulnerability appears in OpenRemote deployments that expose the Velbus asset import functionality and accept XML documents from authenticated users.
It becomes relevant when:
- The XML parser is configured with default or permissive settings
- External entity resolution is not explicitly disabled
- Backend services, internal networks, or sensitive files are reachable from the OpenRemote server
Exploit preconditions
- Attack surface: HTTP(S) endpoint handling Velbus asset XML imports
- Required access: Authenticated access with permission to call the import endpoint
- Trigger point: Submission and processing of crafted XML documents containing external entity declarations
- Why exploitation is possible: The XML parser processes external entities by default, and the application does not enforce explicit XXE protections, allowing the attacker-controlled XML to reference internal files or network resources
Why this happens
The root cause is the use of an XML parser that permits processing of external entities without explicit hardening.
This aligns with CWE-611: Improper Restriction of XML External Entity Reference, where untrusted XML input is parsed without disabling features such as external general entities, parameter entities, or DTDs.
Conceptually, the parser treats data (the XML document) as instructions to fetch and expand external resources, creating an unintended bridge between user-controlled input and internal file systems or network targets.
Potential impact
- Disclosure of server-side files accessible to the OpenRemote process (limited to content under 1023 characters per response)
- Server-Side Request Forgery (SSRF) to internal HTTP(S) services
- Probing of internal network topology and services reachable from the OpenRemote server
- Potential pivot to exploit vulnerabilities on internal services reached via SSRF
- Exposure of sensitive configuration values, credentials, or tokens stored in readable files
General mitigation guidance
Effective mitigation centers on hardening XML parsing behavior and minimizing trust in user-supplied XML:
- Configure XML parsers to disable external entity resolution, DTD processing, and parameter entities by default
- Prefer high-level XML APIs or libraries that are secure-by-default regarding XXE
- Validate and sanitize incoming XML against a strict schema, rejecting unexpected constructs such as DOCTYPE declarations
- Isolate components that must process complex XML in hardened, least-privileged services or sandboxes
- Limit the OpenRemote process's filesystem and network access using OS-level permissions, container policies, and network segmentation
How teams detect issues like this
XXE issues can be surfaced using a combination of review and automated checks:
- Static analysis rules that flag XML parser configurations where external entities or DTDs are enabled on untrusted input paths
- Code review checklists that require explicit disabling of XXE features whenever XML is parsed from user-controlled sources
- Security tests or fuzzing that inject XML payloads with external entities and monitor for outbound requests or unexpected file content in responses
- Web application firewalls or API gateways monitoring for XML payloads containing DOCTYPE declarations and unusual entity constructs

