Vulnerability in send package: Directory Traversal

send Updated 02 Oct 2025

Summary

09/10/2018
MODERATE
Yes i
Moderate
Not published

GHSA-pgv6-jrvv-75jp: Moderate severity vulnerability that affects send. Affects send versions < 0.8.4. Fixed in 0.8.4. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The send package is a popular npm module used in Node.js applications for serving static files. It provides functionality for efficiently transferring files from the server to the client. However, versions prior to 0.8.4 are vulnerable to a directory traversal attack, which allows remote attackers to access restricted directories. This vulnerability occurs due to a partial comparison used by the package to verify if a directory is within the document root.

Vulnerability Detail

The directory traversal vulnerability in the send package allows attackers to bypass access restrictions and retrieve sensitive files from the server. By exploiting this vulnerability, an attacker can traverse the directory structure and access files outside the intended document root. For example, an attacker could access the 'public-restricted' directory located under the 'public' directory, which should be restricted from public access. This can lead to unauthorized disclosure of sensitive information and potential compromise of the server.

How To Fix

Latest published version: 1.2.1 as of 22 Oct 2026

npm install send@1.2.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.8.4

This is the first release that contains the fix.

npm install send@0.8.4

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 can be implemented by manually validating the requested file path against the document root. This can be done by checking if the requested file path is within the document root directory and denying access if it is not. Here is an example of how this can be implemented in Node.js:

const path = require('path');
const send = require('send');

function serveFile(req, res) {
  const requestedFile = req.params.file;
  const documentRoot = path.join(__dirname, 'public');

  if (!requestedFile.startsWith(documentRoot)) {
    res.status(403).send('Access denied.');
    return;
  }

  send(req, requestedFile).pipe(res);
}

Conclusion

The directory traversal vulnerability in the send package can have serious security implications for Node.js applications. It is crucial to upgrade to version 0.8.4 or later to mitigate this vulnerability. If immediate upgrade is not possible, implementing the suggested workaround can provide temporary protection. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for send →

Share this vulnerability

FAQ

The vulnerability allows remote attackers to access restricted directories and potentially retrieve sensitive files from the server. This can lead to unauthorized disclosure of information and compromise the security of the application and server.

Versions prior to 0.8.4 of the send package are affected by this vulnerability.

Yes, upgrading to version 0.8.4 or later of the send package fixes this vulnerability.

A temporary workaround is to manually validate the requested file path against the document root and deny access if it is outside the allowed directory.

Related vulnerabilities

Recent vulnerabilities recorded for send.

How To Fix

Latest published version: 1.2.1 as of 22 Oct 2026

npm install send@1.2.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.8.4

This is the first release that contains the fix.

npm install send@0.8.4

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