CVE-2020-24391: Remote Code Execution in mongo-express

mongodb-query-parser Updated 02 Oct 2025

Summary

13/04/2021
Yes i
Critical
9.8

CVE-2020-24391: Remote code execution in mongo-express. Affects mongodb-query-parser versions < 2.0.0. Fixed in 2.0.0. 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

mongo-express is a web-based MongoDB admin interface written in Node.js. It provides a user-friendly interface for managing MongoDB databases, collections, and documents. The vulnerability identified as CVE-2020-24391 affects mongo-express versions before 1.0.0. This vulnerability allows remote code execution due to unsafe implementation of support for certain advanced syntax. It is worth noting that this vulnerability may overlap with CVE-2019-10769.

Vulnerability Detail

The vulnerability in mongo-express allows an attacker to execute arbitrary code remotely. This can lead to unauthorized access, data manipulation, and potential compromise of the underlying system. The unsafe implementation of advanced syntax support enables an attacker to inject malicious code and execute it within the context of the application.

How To Fix

Latest published version: 5.1.3 as of 23 Oct 2026

npm install mongodb-query-parser@5.1.3

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

If you need the minimum change

2.0.0

This is the first release that contains the fix.

npm install mongodb-query-parser@2.0.0

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

Workaround

As a workaround, if updating to the latest version is not immediately feasible, it is recommended to disable or restrict access to mongo-express until the package can be updated. This can be achieved by blocking network access to the application or implementing access controls at the network level.

Conclusion

The vulnerability in mongo-express before version 1.0.0 allows remote code execution, which can have severe consequences for the affected system. It is crucial to update the package to the latest version or apply the recommended workaround to mitigate the risk. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for mongodb-query-parser →

Share this vulnerability

FAQ

mongo-express is a web-based MongoDB admin interface written in Node.js. It provides a user-friendly interface for managing MongoDB databases, collections, and documents.

The vulnerability allows remote code execution, which can lead to unauthorized access, data manipulation, and potential compromise of the underlying system.

To fix this vulnerability, update mongo-express to version 1.0.0 or later. This version includes the necessary security patches to address the remote code execution vulnerability.

As a workaround, you can disable or restrict access to mongo-express until the package can be updated. This can be achieved by blocking network access to the application or implementing access controls at the network level.

At the time of this report, there are no known public exploits specifically targeting this vulnerability. However, it is important to apply the recommended security updates as soon as possible to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for mongodb-query-parser.

How To Fix

Latest published version: 5.1.3 as of 23 Oct 2026

npm install mongodb-query-parser@5.1.3

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

If you need the minimum change

2.0.0

This is the first release that contains the fix.

npm install mongodb-query-parser@2.0.0

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