CVE-2018-3717: Connect Cross-Site Scripting Vulnerability
MODERATECVE-2018-3717 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Connect libraries in the npm ecosystem. The issue involves cross-site scripting in connect. Remediation is available by upgrading affected packages to version 2.14.0.
CVE-2018-3717 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2018-3717
To remediate this vulnerability, upgrade all affected Connect 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 connect@2.14.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls connect
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2018-3717, inspect your project dependencies using npm:
npm ls connect
Analyze the terminal output to locate any version of Connect in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.14.0), your application is affected.
Note: The npm ls connect 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 Connect, 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-2018-3717 Affected Connect Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
connect
|
npm |
< 2.14.0
|
2.14.0
|
References
Frequently Asked Questions
What is CVE-2018-3717?
Which Connect versions are affected?
What version fixes CVE-2018-3717?
Is connect affected?
What is the CVSS score of CVE-2018-3717?
What CWE is associated with CVE-2018-3717?
How can I check npm dependencies for CVE-2018-3717?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rch9-xh7r-mqgw",
"modified" : "2023-05-30T19:26:12Z",
"published" : "2018-07-26T15:08:05Z",
"aliases" : [ "CVE-2018-3717" ],
"summary" : "Cross-Site Scripting in connect",
"details" : "connect node module before 2.14.0 suffers from a Cross-Site Scripting (XSS) vulnerability due to a lack of validation of file in directory.js middleware.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "connect"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.14.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-3717"
}, {
"type" : "WEB",
"url" : "https://github.com/JacksonTian/anywhere/issues/33#issuecomment-366527448"
}, {
"type" : "WEB",
"url" : "https://github.com/senchalabs/connect/commit/6d5dd30075d2bc4ee97afdbbe3d9d98d8d52d74b"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/309394"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/309641"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-rch9-xh7r-mqgw"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/584"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/595"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:54:23Z",
"nvd_published_at" : "2018-06-07T02:29:00Z"
}
}