lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <f45d4b21fe3f270bc78dca28823933cc@advisories.dxw.com> Date: Mon, 14 May 2018 18:01:07 +0000 From: dxw Security <harry@....com> To: fulldisclosure@...lists.org Subject: [FD] Stored XSS in WP ULike allows unauthorised users to do almost anything an admin can (WordPress plugin) Details ================ Software: WP ULike Version: 2.8.1,3.1 Homepage: https://wordpress.org/plugins/wp-ulike/ Advisory report: https://advisories.dxw.com/advisories/stored-xss-wp-ulike/ CVE: Awaiting assignment CVSS: 6.4 (Medium; AV:N/AC:L/Au:N/C:P/I:P/A:N) Description ================ Stored XSS in WP ULike allows unauthorised users to do almost anything an admin can Vulnerability ================ The plugin’s default configuration (after pressing “Save Changes” on the settings page) allows unauthenticated users to “like” posts. It fetches the user’s IP like this: function wp_ulike_get_real_ip() { if (getenv(\'HTTP_CLIENT_IP\')) { $ip = getenv(\'HTTP_CLIENT_IP\'); } elseif (getenv(\'HTTP_X_FORWARDED_FOR\')) { $ip = getenv(\'HTTP_X_FORWARDED_FOR\'); } elseif (getenv(\'HTTP_X_FORWARDED\')) { $ip = getenv(\'HTTP_X_FORWARDED\'); } elseif (getenv(\'HTTP_FORWARDED_FOR\')) { $ip = getenv(\'HTTP_FORWARDED_FOR\'); } elseif (getenv(\'HTTP_FORWARDED\')) { $ip = getenv(\'HTTP_FORWARDED\'); } else { $ip = $_SERVER[\'REMOTE_ADDR\']; } return $ip; } This will be incorrect in many situations. The header (which could be an IP address, or it could be an arbitrary string provided by the user) is stored in the database. Then it’s displayed to the admin without being escaped. Proof of concept ================ Enable the plugin Visit /wp-admin/admin.php?page=wp-ulike-settings and press Save Settings Sign out Visit a post displaying a like button Open the console Paste and execute this: var d=document.querySelector(\'.wpulike-default a\').dataset;jQuery.ajax(\'/wp-admin/admin-ajax.php\', {method: \'POST\', headers: {\'X-Forwarded-For\': \'<script>alert(1)</script>\'},data: {action: \'wp_ulike_process\', id: d.ulikeId, status: d.ulikeStatus, type: d.ulikeType, nonce: d.ulikeNonce}}) Sign in Visit /wp-admin/admin.php?page=wp-ulike-post-logs Mitigations ================ Upgrade to version 3.2 or later. Disclosure policy ================ dxw believes in responsible disclosure. Your attention is drawn to our disclosure policy: https://security.dxw.com/disclosure/ Please contact us on security@....com to acknowledge this report if you received it via a third party (for example, plugins@...dpress.org) as they generally cannot communicate with us on your behalf. This vulnerability will be published if we do not receive a response to this report with 14 days. Timeline ================ 2017-10-18: Discovered 2018-04-16: Reported to plugin author via contact form 2018-04-23: Vendor reported fixed in 3.2 (first reply) Discovered by dxw: ================ Tom Adams Please visit security.dxw.com for more information. _______________________________________________ Sent through the Full Disclosure mailing list https://nmap.org/mailman/listinfo/fulldisclosure Web Archives & RSS: http://seclists.org/fulldisclosure/
Powered by blists - more mailing lists