CVE-2013-7454: Validator Cross-Site Scripting Vulnerability
MODERATECVE-2013-7454 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Validator libraries in the npm ecosystem. The issue involves multiple xss filter bypasses in validator. Remediation is available by upgrading affected packages to version 1.1.0.
CVE-2013-7454 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2013-7454
To remediate this vulnerability, upgrade all affected Validator dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install validator@1.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls validator
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2013-7454, inspect your project dependencies using npm:
npm ls validator
Analyze the terminal output to locate any version of Validator in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.
Note: The npm ls validator command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Validator, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2013-7454 Affected Validator Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
validator
|
npm |
< 1.1.0
|
1.1.0
|
References
Frequently Asked Questions
What is CVE-2013-7454?
Which Validator versions are affected?
What version fixes CVE-2013-7454?
Is validator affected?
What is the CVSS score of CVE-2013-7454?
What CWE is associated with CVE-2013-7454?
How can I check npm dependencies for CVE-2013-7454?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q4qq-fm7q-cwp5",
"modified" : "2021-09-16T19:30:36Z",
"published" : "2017-10-24T18:33:36Z",
"aliases" : [ "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "validator"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.0"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:50:57Z",
"nvd_published_at" : null
}
}