
Script de explotación en Python para CVE-2023-1874, una vulnerabilidad de escalada de privilegios en el plugin WP Data Access de WordPress. Permite a usuarios autenticados con privilegios bajos escalar su rol.
ESTE SCRIPT ESTÁ DISEÑADO SOLO PARA FINES EDUCATIVOS Y DE SOMBRERO BLANCO. CUALQUIER USO DE ESTO CONTRA UN DISPOSITIVO QUE NO ESTÉS AUTORIZADO A PROBAR O QUE NO POSEEAS ES TU PROPIA RESPONSABILIDAD. EL AUTOR DE ESTE SCRIPT NO SE HACE RESPONSABLE DE NADA DE LO QUE HAGAS CON ESTE SCRIPT. TUS ACCIONES SON TUYAS.
CVE-2023-1874 es una vulnerabilidad en el plugin WP Data Access en versiones 5.3.7 y anteriores. Un atacante puede suministrar la opción wpda_role[] al actualizar un perfil para escalar privilegios.
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