Medium

langchainjs

Path Traversal in getFullPath Method

The `getFullPath` method in version 0.2.5 of the software is vulnerable to path traversal attacks, allowing attackers to save, read, and delete files anywhere in the filesystem. This issue has not yet been patched.

Available publicly on Sep 12 2024

6.5

CVSS:

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Credit:

dastaj
Remediation Steps
  • Validate and sanitize all user inputs to ensure they do not contain path traversal sequences (e.g., ../).
  • Implement a whitelist of allowed file paths and ensure that all file operations are restricted to these paths.
  • Use secure libraries or built-in functions that handle file paths safely.
  • Update the software to a patched version once available.
  • Conduct a thorough security review of the file handling code to identify and fix any other potential vulnerabilities.
Patch Details
  • Fixed Version: N/A
  • Patch Commit: N/A
Want more out of Sightline?

Sightline offers even more for premium customers

Go Premium

We have - related security advisories that are available with Sightline Premium.