Contextual Adminbar Color < 0.3 - Authenticated Stored Cross-Site Scripting Issue



Description
The variable $message is not escaped :
$message = sanitize_text_field( $current_settings['message'] );
Then, it's printed in a value attribute :
value="<?php echo $message; ?>"
Proof of Concept
Edit (WPScanTeam): Put the payload below in the custom message field in the plugin's settings page (Tools > Adminbar Settings):

" onfocus=alert(2) autofocus=autofocus b

Affects Plugin

fixed in version 0.3

References

URL https://plugins.trac.wordpress.org/changeset/2229418

Classification

Type XSS
OWASP Top 10 A7: Cross-Site Scripting (XSS)
CWE CWE-79

Miscellaneous

Original Researcher julio potier
Submitter julio potier
Submitter Website https://secupress.me
Submitter Twitter @secupress
Views 3030
Verified No
WPVDB ID 10033

Timeline

Publicly Published 2020-01-19 (about 1 month ago)
Added 2020-01-20 (about 1 month ago)
Last Updated 2020-01-20 (about 1 month ago)

Our Other Services

Online WordPress Vulnerability Scanner WPScan WordPress Security Plugin