
Script de exploração em Python para CVE-2023-1874, uma vulnerabilidade de escalonamento de privilégios no plugin WP Data Access do WordPress. Permite que usuários autenticados com privilégios baixos escalem sua função.
ESTE SCRIPT FOI PROJETADO APENAS PARA FINS EDUCACIONAIS E DE WHITE HAT. QUALQUER USO DESTE SCRIPT CONTRA UM DISPOSITIVO QUE VOCÊ NÃO ESTEJA AUTORIZADO A TESTAR OU QUE NÃO POSSUA É DE SUA TOTAL RESPONSABILIDADE. O AUTOR DESTE SCRIPT NÃO SE RESPONSABILIZA POR NADA QUE VOCÊ FIZER COM ELE. SUAS AÇÕES SÃO DE SUA RESPONSABILIDADE.
CVE-2023-1874 é uma vulnerabilidade no plugin WP Data Access, versões 5.3.7 e anteriores. Um atacante pode fornecer a opção wpda_role[] ao atualizar um perfil para escalar privilégios.
Do 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