
Python-Exploit-Skript für CVE-2023-1874, eine Privilegieneskalations-Schwachstelle im WP Data Access WordPress-Plugin. Ermöglicht authentifizierten Benutzern mit niedrigen Berechtigungen, ihre Rolle zu erhöhen.
DIESES SKRIPT IST AUSSCHLIESSLICH FÜR WHITE-HAT- UND BILDUNGSZWECKE GEDACHT. JEGLICHE VERWENDUNG GEGEN EIN GERÄT, DAS SIE NICHT TESTEN DÜRFEN ODER DAS IHNEN NICHT GEHÖRT, LIEGT IN IHRER EIGENEN VERANTWORTUNG. DER AUTOR DIESES SKRIPTS ÜBERNIMMT KEINE HAFTUNG FÜR IRGENDETWAS, DAS SIE MIT DIESEM SKRIPT TUN. IHRE HANDLUNGEN SIND IHRE EIGENEN.
CVE-2023-1874 ist eine Sicherheitslücke im WP Data Access Plugin in den Versionen 5.3.7 und früher. Ein Angreifer kann die Option wpda_role[] beim Aktualisieren eines Profils ausnutzen, um Berechtigungen zu erweitern.
Von 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