WordPress User Login History 1.5.2 Cross Site Scripting Vulnerability
2017-11-01T00:00:00
ID 1337DAY-ID-28940 Type zdt Reporter Nicolas Buzy-Debat Modified 2017-11-01T00:00:00
Description
WordPress User Login History plugin version 1.5.2 suffers from a cross site scripting vulnerability.
Product: User Login History Wordpress Plugin - https://wordpress.org/plugins/user-login-history/
Vendor: Er Faiyaz Alam
Tested version: 1.5.2
CVE ID: CVE-2017-15867
** CVE description **
Multiple cross-site scripting (XSS) vulnerabilities in the user-login-history plugin through 1.5.2 for WordPress allow remote attackers to inject arbitrary web script or HTML via the (1) date_from, (2) date_to, (3) user_id, (4) username, (5) country_name, (6) browser, (7) operating_system, or (8) ip_address parameter to admin/partials/listing/listing.php.
** Technical details **
The above-mentioned HTTP GET parameters are directly put into the value attribute of an HTML form field without proper sanitization. An attacker can close the HTML input tag with the "> (%22%3E) expression and inject arbitrary HTML/JavaScript code.
Example of the vulnerable code with the date_from parameter (line 21):
<td><input readonly="readonly" autocomplete="off" placeholder="<?php _e("From", "user-login-history") ?>" id="date_from" name="date_from" value="<?php echo isset($_GET['date_from']) ? $_GET['date_from'] : "" ?>" class="textfield-bg"></td>
** Proof of Concept **
Example using the user_id parameter:
http://<host>/wordpress/wp-admin/admin.php?page=user-login-history&user_id=%22%3E%3Cscript%3Ealert%28document.cookie%29%3B%3C%2Fscript%3E
** Solution **
Update to version 1.6.
** Timeline **
15/10/2017: vendor contacted
15/10/2017: vendor acknowledgment
18/10/2017: fix pushed to GitHub
30/10/2017: fixed release available on WordPress Plugins Store.
** Credits **
Vulnerability discovered by Nicolas Buzy-Debat working at Orange Cyberdefense Singapore (CERT-LEXSI).
** References **
- WordPress-plugin-user-login-history GitHub : error log and xss and some minor improvements
https://github.com/faiyazalam/WordPress-plugin-user-login-history/commit/519341a7dece59e2c589b908a636e6cf12a61741
--
Best Regards,
Nicolas Buzy-Debat
Orange Cyberdefense Singapore (CERT-LEXSI)
_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
# 0day.today [2018-01-06] #
{"href": "https://0day.today/exploit/description/28940", "sourceData": "Product: User Login History Wordpress Plugin - https://wordpress.org/plugins/user-login-history/\r\nVendor: Er Faiyaz Alam\r\nTested version: 1.5.2\r\nCVE ID: CVE-2017-15867\r\n\r\n** CVE description **\r\nMultiple cross-site scripting (XSS) vulnerabilities in the user-login-history plugin through 1.5.2 for WordPress allow remote attackers to inject arbitrary web script or HTML via the (1) date_from, (2) date_to, (3) user_id, (4) username, (5) country_name, (6) browser, (7) operating_system, or (8) ip_address parameter to admin/partials/listing/listing.php.\r\n\r\n** Technical details **\r\nThe above-mentioned HTTP GET parameters are directly put into the value attribute of an HTML form field without proper sanitization. An attacker can close the HTML input tag with the \"> (%22%3E) expression and inject arbitrary HTML/JavaScript code.\r\n\r\nExample of the vulnerable code with the date_from parameter (line 21):\r\n<td><input readonly=\"readonly\" autocomplete=\"off\" placeholder=\"<?php _e(\"From\", \"user-login-history\") ?>\" id=\"date_from\" name=\"date_from\" value=\"<?php echo isset($_GET['date_from']) ? $_GET['date_from'] : \"\" ?>\" class=\"textfield-bg\"></td>\r\n\r\n** Proof of Concept **\r\nExample using the user_id parameter:\r\nhttp://<host>/wordpress/wp-admin/admin.php?page=user-login-history&user_id=%22%3E%3Cscript%3Ealert%28document.cookie%29%3B%3C%2Fscript%3E\r\n\r\n** Solution **\r\nUpdate to version 1.6.\r\n\r\n** Timeline **\r\n15/10/2017: vendor contacted\r\n15/10/2017: vendor acknowledgment\r\n18/10/2017: fix pushed to GitHub\r\n30/10/2017: fixed release available on WordPress Plugins Store.\r\n\r\n** Credits **\r\nVulnerability discovered by Nicolas Buzy-Debat working at Orange Cyberdefense Singapore (CERT-LEXSI).\r\n\r\n** References **\r\n- WordPress-plugin-user-login-history GitHub : error log and xss and some minor improvements\r\nhttps://github.com/faiyazalam/WordPress-plugin-user-login-history/commit/519341a7dece59e2c589b908a636e6cf12a61741\r\n--\r\nBest Regards,\r\n\r\nNicolas Buzy-Debat\r\nOrange Cyberdefense Singapore (CERT-LEXSI)\r\n_________________________________________________________________________________________________________________________\r\n\r\nCe message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc\r\npas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler\r\na l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,\r\nOrange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.\r\n\r\nThis message and its attachments may contain confidential or privileged information that may be protected by law;\r\nthey should not be distributed, used or copied without authorisation.\r\nIf you have received this email in error, please notify the sender and delete this message and its attachments.\r\nAs emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.\r\nThank you.\n\n# 0day.today [2018-01-06] #", "bulletinFamily": "exploit", "modified": "2017-11-01T00:00:00", "title": "WordPress User Login History 1.5.2 Cross Site Scripting Vulnerability", "cvss": {"vector": "AV:NETWORK/AC:MEDIUM/Au:NONE/C:NONE/I:PARTIAL/A:NONE/", "score": 4.3}, "sourceHref": "https://0day.today/exploit/28940", "cvelist": ["CVE-2017-15867"], "description": "WordPress User Login History plugin version 1.5.2 suffers from a cross site scripting vulnerability.", "viewCount": 15, "published": "2017-11-01T00:00:00", "edition": 1, "id": "1337DAY-ID-28940", "type": "zdt", "lastseen": "2018-01-06T02:59:40", "reporter": "Nicolas Buzy-Debat", "enchantments": {"score": {"value": 4.3, "vector": "NONE", "modified": "2018-01-06T02:59:40", "rev": 2}, "dependencies": {"references": [{"type": "cve", "idList": ["CVE-2017-15867"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:144819"]}, {"type": "wpvulndb", "idList": ["WPVDB-ID:8939", "WPVDB-ID:8252F401-C512-47C3-B0B0-9A58C2E54010"]}], "modified": "2018-01-06T02:59:40", "rev": 2}, "vulnersScore": 4.3}, "references": [], "immutableFields": []}
{"cve": [{"lastseen": "2021-02-02T06:36:38", "description": "Multiple cross-site scripting (XSS) vulnerabilities in the user-login-history plugin through 1.5.2 for WordPress allow remote attackers to inject arbitrary web script or HTML via the (1) date_from, (2) date_to, (3) user_id, (4) username, (5) country_name, (6) browser, (7) operating_system, or (8) ip_address parameter to admin/partials/listing/listing.php.", "edition": 6, "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "MEDIUM", "confidentialityImpact": "LOW", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "NETWORK", "availabilityImpact": "NONE", "integrityImpact": "LOW", "baseScore": 6.1, "privilegesRequired": "NONE", "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "userInteraction": "REQUIRED", "version": "3.0"}, "impactScore": 2.7}, "published": "2017-10-24T19:29:00", "title": "CVE-2017-15867", "type": "cve", "cwe": ["CWE-79"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": true, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "NONE", "availabilityImpact": "NONE", "integrityImpact": "PARTIAL", "baseScore": 4.3, "vectorString": "AV:N/AC:M/Au:N/C:N/I:P/A:N", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 2.9, "obtainUserPrivilege": false}, "cvelist": ["CVE-2017-15867"], "modified": "2017-11-14T21:26:00", "cpe": ["cpe:/a:user-login-history_project:user-login-history:1.5.2"], "id": "CVE-2017-15867", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-15867", "cvss": {"score": 4.3, "vector": "AV:N/AC:M/Au:N/C:N/I:P/A:N"}, "cpe23": ["cpe:2.3:a:user-login-history_project:user-login-history:1.5.2:*:*:*:*:wordpress:*:*"]}], "packetstorm": [{"lastseen": "2017-10-31T22:00:24", "description": "", "published": "2017-10-31T00:00:00", "type": "packetstorm", "title": "WordPress User Login History 1.5.2 Cross Site Scripting", "bulletinFamily": "exploit", "cvelist": ["CVE-2017-15867"], "modified": "2017-10-31T00:00:00", "id": "PACKETSTORM:144819", "href": "https://packetstormsecurity.com/files/144819/WordPress-User-Login-History-1.5.2-Cross-Site-Scripting.html", "sourceData": "`Product: User Login History Wordpress Plugin - https://wordpress.org/plugins/user-login-history/ \nVendor: Er Faiyaz Alam \nTested version: 1.5.2 \nCVE ID: CVE-2017-15867 \n \n** CVE description ** \nMultiple cross-site scripting (XSS) vulnerabilities in the user-login-history plugin through 1.5.2 for WordPress allow remote attackers to inject arbitrary web script or HTML via the (1) date_from, (2) date_to, (3) user_id, (4) username, (5) country_name, (6) browser, (7) operating_system, or (8) ip_address parameter to admin/partials/listing/listing.php. \n \n** Technical details ** \nThe above-mentioned HTTP GET parameters are directly put into the value attribute of an HTML form field without proper sanitization. An attacker can close the HTML input tag with the \"> (%22%3E) expression and inject arbitrary HTML/JavaScript code. \n \nExample of the vulnerable code with the date_from parameter (line 21): \n<td><input readonly=\"readonly\" autocomplete=\"off\" placeholder=\"<?php _e(\"From\", \"user-login-history\") ?>\" id=\"date_from\" name=\"date_from\" value=\"<?php echo isset($_GET['date_from']) ? $_GET['date_from'] : \"\" ?>\" class=\"textfield-bg\"></td> \n \n** Proof of Concept ** \nExample using the user_id parameter: \nhttp://<host>/wordpress/wp-admin/admin.php?page=user-login-history&user_id=%22%3E%3Cscript%3Ealert%28document.cookie%29%3B%3C%2Fscript%3E \n \n** Solution ** \nUpdate to version 1.6. \n \n** Timeline ** \n15/10/2017: vendor contacted \n15/10/2017: vendor acknowledgment \n18/10/2017: fix pushed to GitHub \n30/10/2017: fixed release available on WordPress Plugins Store. \n \n** Credits ** \nVulnerability discovered by Nicolas Buzy-Debat working at Orange Cyberdefense Singapore (CERT-LEXSI). \n \n** References ** \n- WordPress-plugin-user-login-history GitHub : error log and xss and some minor improvements \nhttps://github.com/faiyazalam/WordPress-plugin-user-login-history/commit/519341a7dece59e2c589b908a636e6cf12a61741 \n-- \nBest Regards, \n \nNicolas Buzy-Debat \nOrange Cyberdefense Singapore (CERT-LEXSI) \n_________________________________________________________________________________________________________________________ \n \nCe message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc \npas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler \na l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, \nOrange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. \n \nThis message and its attachments may contain confidential or privileged information that may be protected by law; \nthey should not be distributed, used or copied without authorisation. \nIf you have received this email in error, please notify the sender and delete this message and its attachments. \nAs emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. \nThank you. \n \n \n \n`\n", "cvss": {"score": 0.0, "vector": "NONE"}, "sourceHref": "https://packetstormsecurity.com/files/download/144819/wpulf152-xss.txt"}], "wpvulndb": [{"lastseen": "2021-02-15T22:17:56", "bulletinFamily": "software", "cvelist": ["CVE-2017-15867"], "description": "The User Login History WordPress plugin was affected by a Cross-Site Scripting (XSS) security vulnerability.\n", "modified": "2020-09-22T07:21:35", "published": "2017-10-26T00:00:00", "id": "WPVDB-ID:8252F401-C512-47C3-B0B0-9A58C2E54010", "href": "https://wpscan.com/vulnerability/8252f401-c512-47c3-b0b0-9a58c2e54010", "type": "wpvulndb", "title": "User Login History <= 1.5 - Cross-Site Scripting (XSS)", "sourceData": "", "cvss": {"score": 4.3, "vector": "AV:N/AC:M/Au:N/C:N/I:P/A:N"}}]}