{"id":"CVE-2016-5394","aliases":["EUVD-2022-5871","GHSA-xwf4-88xr-hx2j"],"status":"published","title":"Cross site scripting in Apache Sling","description":"In the XSS Protection API module before 1.0.12 in Apache Sling, the encoding done by the XSSAPI.encodeForJSString() method is not restrictive enough and for some input patterns allows script tags to pass through unencoded, leading to potential XSS vulnerabilities.","severity":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.02604,"percentile":0.85477,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-79"],"published":"2017-07-19T15:00:00Z","modified":"2026-06-17T00:49:19Z","exploits":[{"source":"pocgithub","id":"epicosy/VUL4J-23","title":"epicosy/VUL4J-23","date":"2024-05-31","url":"https://github.com/epicosy/VUL4J-23"},{"source":"pocgithub","id":"shoucheng3/apache__sling-org-apache-sling-xss_CVE-2016-5394_1-0-8","title":"shoucheng3/apache__sling-org-apache-sling-xss_CVE-2016-5394_1-0-8","date":"2025-08-18","url":"https://github.com/shoucheng3/apache__sling-org-apache-sling-xss_CVE-2016-5394_1-0-8"}],"fixes":[{"ecosystem":"Maven","package":"org.apache.sling:org.apache.sling.xss","fixed_in":["1.0.12"],"sources":["ghsa","osv"]},{"ecosystem":"Maven","package":"org.apache.sling:org.apache.sling.xss.compat","fixed_in":["1.1.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Maven","package":"org.apache.sling:org.apache.sling.xss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.12"}]}]},{"source":"ghsa","ecosystem":"Maven","package":"org.apache.sling:org.apache.sling.xss.compat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.1.0"}]}]},{"source":"osv","ecosystem":"Maven","package":"org.apache.sling:org.apache.sling.xss","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.12"}]}],"versions":["1.0.0","1.0.2","1.0.4","1.0.6","1.0.8"]},{"source":"osv","ecosystem":"Maven","package":"org.apache.sling:org.apache.sling.xss.compat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.1.0"}]}],"versions":["1.0.0"]}],"products":[{"vendor":"apache","product":"sling"},{"vendor":"apache software foundation","product":"apache sling"}],"references":[{"url":"https://lists.apache.org/thread.html/332166037a54b97cf41e2b616aaed38439de94b19b204841478e4525%40%3Cdev.sling.apache.org%3E","tags":["x_refsource_MISC","x_transferred"]},{"url":"http://www.securityfocus.com/bid/99870","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-5394","tags":["advisory"]},{"url":"https://lists.apache.org/thread.html/332166037a54b97cf41e2b616aaed38439de94b19b204841478e4525@%3Cdev.sling.apache.org%3E","tags":["web"]},{"url":"https://github.com/jensdietrich/xshady-release/tree/main/CVE-2016-5394","tags":["web"]},{"url":"https://github.com/apache/sling-org-apache-sling-xss/commit/de32b144ad2be3367559f6184d560db42a220529","tags":["web"]},{"url":"https://github.com/advisories/GHSA-xwf4-88xr-hx2j"}],"sources":{"cve":[{"id":"CVE-2016-5394","description":"In the XSS Protection API module before 1.0.12 in Apache Sling, the encoding done by the XSSAPI.encodeForJSString() method is not restrictive enough and for some input patterns allows script tags to pass through unencoded, leading to potential XSS vulnerabilities.","status":"published","published":"2017-07-19T15:00:00Z","modified":"2024-09-16T22:21:15.752Z","updated_at":"2026-11-02T14:33:31.117878Z"}],"euvd":[{"id":"EUVD-2022-5871","description":"In the XSS Protection API module before 1.0.12 in Apache Sling, the encoding done by the XSSAPI.encodeForJSString() method is not restrictive enough and for some input patterns allows script tags to pass through unencoded, leading to potential XSS vulnerabilities.","status":"published","published":"2017-07-19T15:00:00Z","modified":"2024-09-16T22:21:15Z","updated_at":"2026-11-03T00:55:03.452021Z"}],"ghsa":[{"id":"GHSA-xwf4-88xr-hx2j","title":"Cross site scripting in Apache Sling","description":"In the XSS Protection API module before 1.0.12 in Apache Sling, the encoding done by the XSSAPI.encodeForJSString() method is not restrictive enough and for some input patterns allows script tags to pass through unencoded, leading to potential XSS vulnerabilities.","status":"published","published":"2022-05-13T01:25:29Z","modified":"2023-10-11T18:17:29Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:37:08.847568Z"}],"nvd":[{"id":"CVE-2016-5394","description":"In the XSS Protection API module before 1.0.12 in Apache Sling, the encoding done by the XSSAPI.encodeForJSString() method is not restrictive enough and for some input patterns allows script tags to pass through unencoded, leading to potential XSS vulnerabilities.","status":"published","published":"2017-07-19T15:29:00.18Z","modified":"2026-06-17T00:49:19.87Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:03:38.290327Z"}],"osv":[{"id":"GHSA-xwf4-88xr-hx2j","title":"Cross site scripting in Apache Sling","description":"In the XSS Protection API module before 1.0.12 in Apache Sling, the encoding done by the XSSAPI.encodeForJSString() method is not restrictive enough and for some input patterns allows script tags to pass through unencoded, leading to potential XSS vulnerabilities.","status":"published","published":"2022-05-13T01:25:29Z","modified":"2024-02-16T08:25:12.10578Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:47:00.604718Z"}]}}
