CVE-2018-12457: Vulnerability in express-cart allows unauthorized creation of admin user

express-cart Updated 02 Oct 2025

Summary

13/05/2022
No i
High
8.8

CVE-2018-12457: express-cart allows any user to create an admin user. Affected versions are not published. 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 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

Express-Cart is an npm package that provides a shopping cart functionality for Express.js applications. It allows users to manage products, orders, and payments in an e-commerce system. However, a vulnerability has been discovered in versions prior to 1.1.6, which enables remote attackers to create an admin user through a specific request header.

Vulnerability Detail

The vulnerability in express-cart (CVE-2018-12457) arises from a lack of proper access control checks during the setup process. By sending a specially crafted Referer header to the /admin/setup endpoint, an attacker can bypass authentication and create an admin user account. This unauthorized access can lead to severe consequences, such as unauthorized access to sensitive data, modification of system settings, and potential compromise of the entire e-commerce system.

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 the latest version is not immediately feasible, a temporary workaround can be implemented by manually modifying the code. The following code snippet demonstrates how to add access control checks to the /admin/setup endpoint:

app.post('/admin/setup', (req, res) => {
  if (req.headers.referer === 'https://example.com/admin/setup') {
    // Perform admin user setup
  } else {
    // Handle unauthorized access
  }
});

Conclusion

The vulnerability in express-cart (CVE-2018-12457) allows unauthorized creation of admin user accounts, posing a significant risk to the security and integrity of e-commerce systems. It is crucial to upgrade to version 1.1.6 or later to mitigate this vulnerability. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for express-cart →

Share this vulnerability

FAQ

The vulnerability allows remote attackers to create an admin user account, bypassing authentication. This can lead to unauthorized access to sensitive data, modification of system settings, and potential compromise of the entire e-commerce system.

Versions of express-cart prior to 1.1.6 are affected by this vulnerability.

Yes, upgrading to version 1.1.6 or later of express-cart fixes this vulnerability.

A temporary workaround can be implemented by manually adding access control checks to the /admin/setup endpoint as described in the 'workaround' section.

You can find more information about this vulnerability in the CVE-2018-12457 advisory and the GitHub Security Advisory GHSA-hr89-w7p6-pjmq.

Related vulnerabilities

Recent vulnerabilities recorded for express-cart.

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