{"answers":{"affected":"4 open source packages ship an affected version, including org.apache.sling:org.apache.sling.xss and org.apache.sling:org.apache.sling.xss.compat. It affects 1 product.","exploited":"There is no known exploitation of CVE-2016-5394 in the wild and no public exploit code.","fix":"Upgrade org.apache.sling:org.apache.sling.xss to 1.0.12 or later.","what":"CVE-2016-5394 is a medium-severity cross-site scripting vulnerability in Apache Sling, published on 19 Jul 2017. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2016-5394 and fix it if it is affected.\n\nWhat it is: CVE-2016-5394 is a medium-severity cross-site scripting vulnerability in Apache Sling, published on 19 Jul 2017. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2016-5394 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.apache.sling:org.apache.sling.xss (Maven): affected all versions; fixed in 1.0.12\n- org.apache.sling:org.apache.sling.xss (Maven): affected all versions; fixed in 1.0.12\n- org.apache.sling:org.apache.sling.xss.compat (Maven): affected all versions; fixed in 1.1.0\n- org.apache.sling:org.apache.sling.xss.compat (Maven): affected all versions; fixed in 1.1.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2016-5394/ (Markdown: https://insights.sbomify.com/CVE-2016-5394/index.md)","id":"CVE-2016-5394","markdown":"https://insights.sbomify.com/CVE-2016-5394/index.md","name":"CVE-2016-5394","record":{"aliases":["GHSA-xwf4-88xr-hx2j"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Apache Sling XSS API","requires_auth":"none","summary":"Insufficient encoding in Apache Sling XSS API allows script tags to bypass filters, enabling cross-site scripting attacks.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"sling","vendor":"apache"}],"cvss":{"score":6.1,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2024-05-31","github_poc":2,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2024-05-31T21:05:46Z","kind":"github_poc","ref":"https://github.com/epicosy/VUL4J-23","stars":0,"title":"apache/sling with CVE-2016-5394"},{"date":"2025-08-18T08:50:40Z","kind":"github_poc","ref":"https://github.com/shoucheng3/apache__sling-org-apache-sling-xss_CVE-2016-5394_1-0-8","stars":0,"title":null}],"tier":"poc_unverified"},"has_fix":true,"headline":"Cross site scripting in Apache Sling","id":"CVE-2016-5394","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"xss","year":"2016"},"n_packages":4,"n_references":2,"next":{"headline":"Apache Ranger allows remote authenticated administrators to inject arbitrary web script or HTML","id":"CVE-2016-5395"},"packages":[{"ecosystem":"Maven","fixed":["1.0.12"],"introduced":["0"],"last_affected":[],"package":"org.apache.sling:org.apache.sling.xss","purl":null,"source":"GHSA-xwf4-88xr-hx2j"},{"ecosystem":"Maven","fixed":["1.0.12"],"introduced":["0"],"last_affected":[],"package":"org.apache.sling:org.apache.sling.xss","purl":"pkg:maven/org.apache.sling/org.apache.sling.xss","source":"GHSA-xwf4-88xr-hx2j"},{"ecosystem":"Maven","fixed":["1.1.0"],"introduced":["0"],"last_affected":[],"package":"org.apache.sling:org.apache.sling.xss.compat","purl":null,"source":"GHSA-xwf4-88xr-hx2j"},{"ecosystem":"Maven","fixed":["1.1.0"],"introduced":["0"],"last_affected":[],"package":"org.apache.sling:org.apache.sling.xss.compat","purl":"pkg:maven/org.apache.sling/org.apache.sling.xss.compat","source":"GHSA-xwf4-88xr-hx2j"}],"prev":{"headline":"Improper Access Control in Apache Hadoop","id":"CVE-2016-5393"},"products":["Apache Sling"],"published":"2017-07-19","related":[{"cvss_score":9.8,"headline":"XML External Entity Reference in Apache Sling","id":"CVE-2016-6798","kev_date_added":null,"published":"2017-07-19"},{"cvss_score":5.8,"headline":"Apache Sling Auth Core bundle vulnerable to Open Redirection","id":"CVE-2013-4390","kev_date_added":null,"published":"2013-10-24"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-09-16","vendors":["Apache Software Foundation"]},"summary":"Insufficient encoding in Apache Sling XSS API allows script tags to bypass filters, enabling cross-site scripting attacks.","url":"https://insights.sbomify.com/CVE-2016-5394/"}