GHSA-f3vw-587g-r29g: Sapper Path Traversal Vulnerability
CRITICALGHSA-f3vw-587g-r29g is a CRITICAL path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Sapper libraries in the npm ecosystem. The issue involves path traversal in sapper. Remediation is available by upgrading affected packages to version 0.27.11.
GHSA-f3vw-587g-r29g at a Glance
How to Fix GHSA-f3vw-587g-r29g
To remediate this vulnerability, upgrade all affected Sapper 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 sapper@0.27.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls sapper
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-f3vw-587g-r29g, inspect your project dependencies using npm:
npm ls sapper
Analyze the terminal output to locate any version of Sapper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.27.11), your application is affected.
Note: The npm ls sapper 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Sapper, 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-f3vw-587g-r29g Affected Sapper Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sapper
|
npm |
< 0.27.11
|
0.27.11
|
References
Frequently Asked Questions
What is GHSA-f3vw-587g-r29g?
Which Sapper versions are affected?
What version fixes GHSA-f3vw-587g-r29g?
Is sapper affected?
What CWE is associated with GHSA-f3vw-587g-r29g?
How can I check npm dependencies for GHSA-f3vw-587g-r29g?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f3vw-587g-r29g",
"modified" : "2020-08-31T19:01:20Z",
"published" : "2020-09-03T15:50:38Z",
"aliases" : [ ],
"summary" : "Path Traversal in sapper",
"details" : "Versions of `sapper` prior to 0.27.11 are vulnerable to Path Traversal. It is possible to access sensitive files on the server through HTTP requests containing URL-encoded `../`. \n\nYou may test a `sapper` application running in prod mode with `curl -vvv http://localhost:3000/client/750af05c3a69ddc6073a/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/etc/passwd`.\n\n\n## Recommendation\n\nUpgrade to version 0.27.11 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "sapper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.27.11"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1494"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T19:01:20Z",
"nvd_published_at" : null
}
}