Path Traversal Vulnerability in sapper

sapper Updated 02 Oct 2025

Summary

03/09/2020
CRITICAL
Yes i
Critical
Not published

GHSA-f3vw-587g-r29g: Path Traversal in sapper. Affects sapper versions < 0.27.11. Fixed in 0.27.11. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

sapper is an open-source framework for building web applications with Svelte. It provides server-side rendering and code-splitting capabilities, making it efficient and performant. However, versions prior to 0.27.11 are vulnerable to a Path Traversal vulnerability. This vulnerability allows an attacker to access sensitive files on the server by exploiting URL-encoded ../ in HTTP requests.

Vulnerability Detail

The Path Traversal vulnerability in sapper arises from insufficient input validation. By including URL-encoded ../ in the request, an attacker can traverse the file system and access files that should be protected. This can lead to unauthorized disclosure of sensitive information, such as configuration files, user data, or even system files. The impact of this vulnerability depends on the specific files that can be accessed and the privileges of the user running the sapper application.

How To Fix

Minimum fixed version

0.27.11

This is the first release that contains the fix.

npm install sapper@0.27.11

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround is to implement additional input validation and sanitization in the application code. Specifically, any user input that is used to construct file paths should be carefully validated to prevent the inclusion of ../ sequences. Additionally, it is important to ensure that the application runs with the least privileges necessary to limit the potential impact of a successful exploit.

Conclusion

The Path Traversal vulnerability in sapper can lead to unauthorized access to sensitive files on the server. It is crucial to upgrade to version 0.27.11 or later to mitigate this vulnerability. If immediate upgrade is not possible, implementing additional input validation and sanitization can serve as a temporary workaround. For further support and assistance in vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for sapper →

Share this vulnerability

FAQ

A Path Traversal vulnerability, also known as Directory Traversal, occurs when an attacker is able to access files or directories outside of the intended scope. This is typically achieved by manipulating input that is used to construct file paths, such as adding ../ sequences to traverse up the directory structure.

With a Path Traversal vulnerability in sapper, an attacker can potentially access sensitive files on the server. This could include configuration files, user data, or even system files. The impact of the vulnerability depends on the specific files that can be accessed and the privileges of the user running the sapper application.

You can test your sapper application by sending a specially crafted HTTP request containing URL-encoded ../ sequences. For example, you can use the following command: 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. If the response includes sensitive information, your application is vulnerable.

Yes, if upgrading to the latest version of sapper is not immediately feasible, you can implement additional input validation and sanitization in your application code. Ensure that any user input used to construct file paths is carefully validated to prevent the inclusion of ../ sequences. Additionally, running the application with the least privileges necessary can help limit the potential impact of a successful exploit.

You can find more information about the sapper framework on the official documentation website at https://sapper.svelte.dev. The documentation provides detailed guides, examples, and API references to help you understand and use sapper effectively.

How To Fix

Minimum fixed version

0.27.11

This is the first release that contains the fix.

npm install sapper@0.27.11

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback