CVE-2023-52555: Cross-site Request Forgery vulnerability in mongo-express

mongo-express Updated 02 Oct 2025

Summary

01/03/2024
No i
Moderate
6.1

CVE-2023-52555: mongo-express Cross-site Request Forgery vulnerability. Affects mongo-express versions < 1.0.2. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Mongo-express is an npm package that provides a web-based user interface for managing MongoDB databases. It allows users to perform various operations such as creating, updating, and deleting collections. However, version 1.0.2 of mongo-express is vulnerable to Cross-site Request Forgery (CSRF) attacks, which can lead to unauthorized deletion of collections.

Vulnerability Detail

The CSRF vulnerability in mongo-express 1.0.2 allows an attacker to trick a user into performing unintended actions, such as deleting a collection, without their knowledge or consent. This can result in data loss or unauthorized modifications to the database. The vulnerability originates from the lack of proper CSRF protection in the /admin endpoint of mongo-express.

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

If upgrading to a patched version is not immediately feasible, a temporary workaround is to implement CSRF protection at the application level. This can be achieved by adding CSRF tokens to all requests made to the /admin endpoint. Here is an example of how to implement CSRF protection using the Express.js framework:

const express = require('express');
const csrf = require('csurf');

const app = express();

// Enable CSRF protection
app.use(csrf({ cookie: true }));

// Add CSRF token to all responses
app.use((req, res, next) => {
  res.locals.csrfToken = req.csrfToken();
  next();
});

// Route handling /admin requests
app.post('/admin', (req, res) => {
  // Verify CSRF token
  if (req.csrfToken() !== req.body.csrfToken) {
    res.status(403).send('Invalid CSRF token');
    return;
  }

  // Process the request
  // ...
});

// ...

Conclusion

In conclusion, mongo-express version 1.0.2 is vulnerable to Cross-site Request Forgery (CSRF) attacks, which can lead to unauthorized deletion of collections. It is recommended to upgrade to a patched version of mongo-express or implement CSRF protection at the application level. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for mongo-express →

Share this vulnerability

FAQ

Mongo-express is an npm package that provides a web-based user interface for managing MongoDB databases. It allows users to perform various operations such as creating, updating, and deleting collections.

Cross-site Request Forgery (CSRF) is an attack that tricks a user into performing unintended actions on a web application in which they are authenticated. In the case of mongo-express, the CSRF vulnerability allows an attacker to delete collections without the user's knowledge or consent.

To fix the CSRF vulnerability, it is recommended to upgrade to a version of mongo-express that includes a patch for the vulnerability. Alternatively, you can implement CSRF protection at the application level by adding CSRF tokens to all requests made to the /admin endpoint.

Yes, if upgrading to a patched version is not immediately feasible, you can implement CSRF protection at the application level. This involves adding CSRF tokens to all requests made to the /admin endpoint. Refer to the 'workaround' section for an example implementation.

At the time of this advisory, there are no known public exploits specifically targeting this CSRF vulnerability in mongo-express. However, it is important to promptly address this vulnerability to prevent potential unauthorized actions on the database.

Related vulnerabilities

Recent vulnerabilities recorded for mongo-express.

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