CVE-2017-16198: Directory Traversal in ritp

ritp Updated 02 Oct 2025

Summary

06/08/2018
No i
High
7.5

CVE-2017-16198: Directory Traversal in ritp. Affects ritp versions < 1.0.5. No fix is published. 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

The ritp package is an npm package used for local development. It provides functionality for resolving relative file paths. However, versions of ritp prior to 1.0.6 are vulnerable to a directory traversal vulnerability. This vulnerability allows a malicious actor to access files outside of the intended directory root, potentially leading to the disclosure of private files on the vulnerable system.

Vulnerability Detail

The directory traversal vulnerability in ritp arises from the package's improper resolution of relative file paths. By manipulating the file path in a specific way, an attacker can traverse directories and access files outside of the intended directory root. For example, an attacker can send a GET request with a crafted file path to retrieve sensitive files, such as /etc/passwd. This vulnerability has a CVSS score of 7.5, indicating a high severity.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As there is no patch available, a possible workaround is to manually validate and sanitize file paths before using them with ritp. This can be done by ensuring that the file paths only contain allowed characters and do not include any directory traversal sequences. Here is an example of how to sanitize a file path in Node.js:

const path = require('path');

function sanitizeFilePath(filePath) {
  const allowedChars = /^[a-zA-Z0-9_-]+$/;
  const sanitizedPath = path.normalize(filePath);

  if (!allowedChars.test(path.basename(sanitizedPath))) {
    throw new Error('Invalid file path');
  }

  return sanitizedPath;
}

This code snippet uses the path module in Node.js to normalize the file path and ensure it does not contain any directory traversal sequences. It also checks that the basename of the file path only contains allowed characters.

Conclusion

The ritp package is vulnerable to a directory traversal vulnerability that allows attackers to access files outside of the intended directory root. No patch is available for this vulnerability, so it is recommended to only use ritp for local development purposes. If the functionality provided by ritp is required for production, it is advised to use an alternative package that does not suffer from this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ritp →

Share this vulnerability

FAQ

The directory traversal vulnerability in ritp allows an attacker to access sensitive files outside of the intended directory root. This can lead to the disclosure of private files on the vulnerable system, potentially exposing sensitive information.

No, there is no patch available for this vulnerability in ritp.

It is not recommended to use ritp in production due to the directory traversal vulnerability. If the functionality provided by ritp is required for production, it is advised to use an alternative package that does not suffer from this vulnerability.

To mitigate the risk of this vulnerability, it is recommended to only use ritp for local development purposes. Additionally, you can manually validate and sanitize file paths before using them with ritp to prevent directory traversal attacks.

The CVSS score of this vulnerability is 7.5, indicating a high severity.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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