CVE-2023-41034
JSON

6.5medium

DDFFileParser in eclipse leshan is vulnerable to XXE Attacks

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.69% (higher than 54% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-wc9j-gc65-3cm7

Description

Eclipse Leshan is a device management server and client Java implementation. In affected versions DDFFileParser` and `DefaultDDFFileValidator` (and so `ObjectLoader`) are vulnerable to `XXE Attacks`. A DDF file is a LWM2M format used to store LWM2M object description. Leshan users are impacted only if they parse untrusted DDF files (e.g. if they let external users provide their own model), in that case they MUST upgrade to fixed version. If you parse only trusted DDF file and validate only with trusted xml schema, upgrading is not mandatory. This issue has been fixed in versions 1.5.0 and 2.0.0-M13. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Affected

Product or packageVersionsReported by
eclipse-leshan leshan< 1.5.0, >= 2.0.0-M1, < 2.0.0-M13CVE List
org.eclipse.leshan:leshan-core (Maven)before 1.5.0, from 2.0.0-M1 before 2.0.0-M13GitHub Advisory Database
eclipse leshanbefore 1.5.0, 2.0.0NVD

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-611

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Eclipse Leshan is a device management server and client Java implementation. In affected versions DDFFileParser` and `DefaultDDFFileValidator` (and so `ObjectLoader`) are vulnerable to `XXE Attacks`. A DDF file is a LWM2M format used to store LWM2M object description. Leshan users are impacted only if they parse untrusted DDF files (e.g. if they let external users provide their own model), in that case they MUST upgrade to fixed version. If you parse only trusted DDF file and validate only with trusted xml schema, upgrading is not mandatory. This issue has been fixed in versions 1.5.0 and 2.0.0-M13. Users are advised to upgrade. There are no known workarounds for this vulnerability.

GitHub Advisory Database
Impact

DDFFileParser and DefaultDDFFileValidator (and so ObjectLoader) are vulnerable to XXE Attacks.

DDF file is a LWM2M format used to store LWM2M object description.
Leshan users are impacted only if they parse untrusted DDF files (e.g. if they let external users provide their own model), in that case they MUST upgrade to fixed version. If you parse only trusted DDF file and validate only with trusted xml schema, upgrading is not mandatory.

Patches

This is fixed in v1.5.0 and 2.0.0-M13.

Workarounds

No easy way. Eventually writing your own DDFFileParser/DefaultDDFFileValidator (and so ObjectLoader) creating a DocumentBuilderFactory with :

// For DDFFileParser
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); // Disable DTDs
factory.setXIncludeAware(false); // Disable XML Inclusions
factory.setExpandEntityReferences(false); // disable expand entity reference nodes

// For DefaultDDFFileValidator
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
factory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
References
NVD (es)

Eclipse Leshan es una implementación Java de servidor y cliente de gestión de dispositivos. En las versiones afectadas, 'DDFFileParser' y 'DefaultDDFFileValidator' (y por lo tanto 'ObjectLoader') son vulnerables a 'XXE Attacks'. Un archivo DDF es un formato LWM2M utilizado para almacenar la descripción de objetos LWM2M. Los usuarios de Leshan se ven afectados solo si analizan archivos DDF no confiables (p. ej., si permiten que usuarios externos proporcionen su propio modelo), en ese caso DEBEN actualizar a la versión corregida. Si solo analiza archivos DDF confiables y valida solo con esquemas XML confiables, la actualización no es obligatoria. Este problema se ha corregido en las versiones 1.5.0 y 2.0.0-M13. Se aconseja a los usuarios que actualicen. No se conocen soluciones alternativas para esta vulnerabilidad.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-41034 changed 2024-09-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-wc9j-gc65-3cm7 changed 2026-09-10CC-BY-4.0
NVDCVE-2023-41034 changed 2026-06-17Public domain