GitHub Advisoryadvisory · Maven
GHSA-g24f-mgc3-jwwc OpenRemote has XXE in Velbus Asset Import
HIGH
Official page ↗
- Aliases
- CVE-2026-40882
- Ecosystem
- Maven
- Packages
- io.openremote:openremote-manager
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
- Weaknesses
- CWE-611
- Reviewed
- 2026-04-15
Affected packages
• Maven io.openremote:openremote-manager: < 1.22.0 → fixed in 1.22.0
Description
Summary
The Velbus asset import path parses attacker-controlled XML without explicit XXE hardening. An authenticated user who can call the import endpoint may trigger XML external entity processing, which can lead to server-side file disclosure and SSRF. The target file must be less than 1023 characters.
Details
Velbus import uses `DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(...)` on untrusted XML input, without explicit safeguards to disable DTD/external entities.
```154:165:agent/src/main/java/org/openremote/agent/protocol/velbus/AbstractVelbusProtocol.java
@Override
public Future startAssetImport(byte[] fileData, Consumer assetConsumer) {
return executorService.submit(() -> {
Document xmlDoc;
try {
String xmlStr = new String(fileData, StandardCharsets.UTF_8);
LOG.info("Parsing VELBUS project file");
xmlDoc = DocumentBuilderFactory
.newInstance()
.newDocumentBuilder()
.parse(new InputSource(new StringReader(xmlStr)));
```
Expanded `Caption` content is propagated into created asset names:
```193:198:agent/src/main/java/org/openremote/agent/protocol/velbus/AbstractVelbusProtocol.java
String name = module.getElementsByTagName("Caption").item(0).getTextContent();
name = isNullOrEmpty(name) ? deviceType.toString() : name;
// TODO: Use device specific asset types
Asset device = new ThingAsset(name);
```
PoC
1. Log in to a realm with a user that can call Velbus asset import.
2. Create/select a Velbus TCP Agent in that same realm.
3. Send `POST /api/{realm}/agent/assetImport/{agentId}` with a Velbus project XML payload and compare behavior against a baseline import file.
3. Save the below code as a `xxe.xml` and upload to `Setup` under `https://localhost/manager/?realm=#/assets/false/`. Chnage the `file:///etc/passwd` to another file if your `passwd` is longer than 1023 characters.
```xml
]>
&xxe;
```
As long as the file content is under 1023 characters, the exploit will succeed.
If the file content reaches the limit, an error is thrown.
Impact
• Type: XML External Entity (XXE)
• Affected: Deployments exposing Velbus import to authenticated users with import access
• Risk: limited local file disclosure (as long as the file is under 1023 characters) from the Manager runtime, and SSRF.
Related
Alias · CVE (1)
- CVE-2026-40882 OpenRemote is an open-source internet-of-things platform. vulnerability
Weakness · CWE (1)
- CWE-611 Improper Restriction of XML External Entity Reference weakness