CVE-2021-21266:XML External Entity (XXE) vulnerability in openHAB allows attackers on the same network to retrieve internal system files.

splash
Back

Description Preview

A vulnerability in openHAB before versions 2.5.12 and 3.0.1 allows attackers on the same network to perform XML External Entity (XXE) attacks. This vulnerability enables attackers to retrieve internal information such as file system contents. SSDP request responses are particularly vulnerable to exploitation. Multiple add-ons that parse externally received XML using SAX or JAXB are affected, including AvmFritz, BoseSoundtouch, DenonMarantz, and many others.

Overview

The XXE vulnerability (CVE-2021-21266) affects openHAB, an open-source home automation software. The vulnerability exists in the XML parsing functionality used by numerous add-ons. When processing XML from external sources, the application fails to properly disable external entity processing, allowing attackers to read files from the system hosting openHAB. This attack is particularly effective when targeting responses to SSDP requests. The vulnerability impacts a wide range of add-ons including AvmFritz, BoseSoundtouch, DenonMarantz, DLinkSmarthome, Enigma2, FmiWeather, FSInternetRadio, Gce, Homematic, HPPrinter, IHC, Insteon, Onkyo, Roku, SamsungTV, Sonos, Tellstick, TR064, UPnPControl, Vitotronic, Wemo, YamahaReceiver, and XPath Transformation.

Remediation

To remediate this vulnerability, users should upgrade to openHAB version 2.5.12 or 3.0.1 or later, which implement more strict XML parser configurations that prevent XXE attacks. The fix involves properly configuring the XML parsers to disable external entity processing. If upgrading is not immediately possible, network isolation of the openHAB instance is recommended to prevent attackers from accessing the vulnerable service.

References

  1. GitHub Security Advisory: https://github.com/openhab/openhab-addons/security/advisories/GHSA-r2hc-pmr7-4c9r
  2. Fix Commit: https://github.com/openhab/openhab-addons/commit/81935b0ab126e6d9aebd2f6c3fc67d82bb7e8b86
  3. Technical Description on XXE with JAXB: https://www.contrastsecurity.com/security-influencers/xml-xxe-pitfalls-with-jaxb
  4. Guide on Preventing XXE in Java XML Parsers: https://dev.to/brianverm/configure-your-java-xml-parsers-to-prevent-xxe-213c

Industry ExposureMost to least
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.

  1. Accommodation & Food Services
    Accommodation & Food Services
  2. Administrative, Support, Waste Management & Remediation Services
    Administrative, Support, Waste Management & Remediation Services
  3. Agriculture, Forestry Fishing & Hunting
    Agriculture, Forestry Fishing & Hunting
  4. Arts, Entertainment & Recreation
    Arts, Entertainment & Recreation
  5. Construction
    Construction
  6. Educational Services
    Educational Services
  7. Finance and Insurance
    Finance and Insurance
  8. Health Care & Social Assistance
    Health Care & Social Assistance
  9. Information
    Information
  10. Management of Companies & Enterprises
    Management of Companies & Enterprises
  11. Manufacturing
    Manufacturing
  12. Mining
    Mining
  13. Other Services (except Public Administration)
    Other Services (except Public Administration)
  14. Professional, Scientific, & Technical Services
    Professional, Scientific, & Technical Services
  15. Public Administration
    Public Administration
  16. Real Estate Rental & Leasing
    Real Estate Rental & Leasing
  17. Retail Trade
    Retail Trade
  18. Transportation & Warehousing
    Transportation & Warehousing
  19. Utilities
    Utilities
  20. Wholesale Trade
    Wholesale Trade

Focus on What Matters

  1. See Everything.
  2. Identify True Risk.
  3. Proactively Mitigate Threats.

Let's talk!

background