
Script d'exploitation Python pour CVE-2023-1874, une vulnérabilité d'élévation de privilèges dans le plugin WordPress WP Data Access. Permet aux utilisateurs authentifiés à faibles privilèges d'élever leur rôle.
CE SCRIPT EST CONÇU UNIQUEMENT À DES FINS DE PENTESTING ÉTHIQUE (WHITE HAT) ET ÉDUCATIVES. TOUTE UTILISATION DE CE SCRIPT SUR UN APPAREIL QUE VOUS N'ÊTES PAS AUTORISÉ À TESTER OU QUE VOUS NE POSSÉDEZ PAS EST DE VOTRE PROPRE RESPONSABILITÉ. L'AUTEUR DE CE SCRIPT DÉCLINE TOUTE RESPONSABILITÉ QUANT À TOUT CE QUE VOUS FAITES AVEC CE SCRIPT. VOS ACTIONS VOUS APPARTIENNENT.
CVE-2023-1874 est une vulnérabilité dans les versions 5.3.7 et antérieures du plugin WP Data Access. Un attaquant peut fournir l'option wpda_role[] lors de la mise à jour d'un profil pour élever ses privilèges.
Extrait de NIST :
The WP Data Access plugin for WordPress is vulnerable to privilege escalation in versions up to, and including, 5.3.7. This is due to a lack of authorization checks on the multiple_roles_update function. This makes it possible for authenticated attackers, with minimal permissions such as a subscriber, to modify their user role by supplying the 'wpda_role[]' parameter during a profile update. This requires the 'Enable role management' setting to be enabled for the site.
# not necessary.
#
# these can be manually input as arguments to the script.
#
# theses exports are for ease-of-use.
export TARGETIP=localhost
export TARGETPORT=80
export WPPATH=wordpress
export WPUSERNAME=myuser
export WPPASSWORD=mypass
python3 cve20231874.py $TARGETIP $TARGETPORT -u $WPUSERNAME -p $WPPASSWORD --path $WPPATH