Vulnerabilities in pkg:npm/serve-handler
PACKAGEGHSA-9vhv-p9r7-rm53 is a MODERATE html tag injection vulnerability (General Security Weakness) affecting Serve handler libraries in the npm ecosystem. The issue involves html tag injection. Remediation is available by upgrading affected packages to version 5.0.3.
pkg:npm/serve-handler
Vulnerability advisories affecting package pkg:npm/serve-handler. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9vhv-p9r7-rm53 | - | MODERATE | HTML tag injection |
GHSA-9vhv-p9r7-rm53 at a Glance
How to Fix GHSA-9vhv-p9r7-rm53
To remediate this vulnerability, upgrade all affected Serve handler 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 serve-handler@5.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls serve-handler
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-9vhv-p9r7-rm53, inspect your project dependencies using npm:
npm ls serve-handler
Analyze the terminal output to locate any version of Serve handler in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.3), your application is affected.
Note: The npm ls serve-handler 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 General Security Weakness. In Serve handler, 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
GHSA-9vhv-p9r7-rm53 Affected Serve handler Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
serve-handler
|
npm |
< 5.0.3
|
5.0.3
|
References
Frequently Asked Questions
What is GHSA-9vhv-p9r7-rm53?
Which Serve handler versions are affected?
What version fixes GHSA-9vhv-p9r7-rm53?
Is serve-handler affected?
What CWE is associated with GHSA-9vhv-p9r7-rm53?
How can I check npm dependencies for GHSA-9vhv-p9r7-rm53?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9vhv-p9r7-rm53",
"modified" : "2021-02-23T21:37:48Z",
"published" : "2021-02-23T21:37:48Z",
"withdrawn" : "2021-02-23T21:37:48Z",
"aliases" : [ ],
"summary" : "HTML tag injection",
"details" : "Serve Handler, before 5.0.3, has a XSS via HTML tag injection in directory lisiting page.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "serve-handler"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/zeit/serve-handler/commit/65b4d4183a31a8076c78c40118acb0ca1b64f620"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/398285"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-06-06T08:49:37Z",
"nvd_published_at" : null
}
}