Untrusted Search Path Affecting mongosh package, versions <2.3.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-MONGOSH-9005463
  • published28 Feb 2025
  • disclosed27 Feb 2025
  • creditUnknown

Introduced: 27 Feb 2025

NewCVE-2025-1756  (opens in a new tab)
CWE-426  (opens in a new tab)

How to fix?

Upgrade mongosh to version 2.3.0 or higher.

Overview

mongosh is a MongoDB Shell CLI REPL

Affected versions of this package are vulnerable to Untrusted Search Path due to the handling of crafted files stored in specific directories. An attacker can execute unauthorized actions with elevated privileges by placing a specially crafted file in the C:\node_modules\ directory.

Note:

This is only exploitable if the user has permissions to access and write to system directories.

References

CVSS Scores

version 4.0
version 3.1