Skip to content

Commit a402971

Browse files
committed
Added V5.2.1
1 parent 2368593 commit a402971

File tree

2 files changed

+9912
-0
lines changed

2 files changed

+9912
-0
lines changed

templates/5.2.1.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
id: ASVS-4-0-3-V5-2-1
2+
3+
info:
4+
name: ASVS 5.2.1 Check
5+
author: Masoud Abdaal
6+
severity: high
7+
classification:
8+
cwe-id: CWE-116
9+
reference:
10+
- https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/11-Client-side_Testing/03-Testing_for_HTML_Injection
11+
- https://github.com/OWASP/ASVS/blob/master/4.0/en/0x13-V5-Validation-Sanitization-Encoding.md#v52-sanitization-and-sandboxing
12+
tags: asvs,5.2.1
13+
description: |
14+
Verify that all untrusted HTML input from WYSIWYG editors or similar is properly sanitized with an HTML sanitizer library or framework feature.
15+
16+
requests:
17+
- name: EditorJS Payloads
18+
method: POST
19+
path:
20+
- "{{BaseURL}}"
21+
headers:
22+
Content-Type: application/json
23+
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0
24+
25+
attack: clusterbomb
26+
payloads:
27+
payload: "templates/dast/assets/5.2.1Payloads.txt"
28+
matchers:
29+
- type: word
30+
part: body
31+
words:
32+
- "{{payload}}"
33+
body: |
34+
{
35+
"time": "{{payload}}",
36+
"blocks": [
37+
{
38+
"type": "{{payload}}",
39+
"data": {
40+
"text": "{{payload}}",
41+
"level": "{{payload}}"
42+
}
43+
},
44+
{
45+
"type": "{{payload}}",
46+
"data": {
47+
"text": "{{payload}}"
48+
}
49+
},
50+
{
51+
"type": "{{payload}}",
52+
"data": {
53+
"style": "{{payload}}",
54+
"items": [
55+
"{{payload}}",
56+
"{{payload}}",
57+
"{{payload}}"
58+
]
59+
}
60+
}
61+
],
62+
"version": "{{payload}}"
63+
}
64+
65+
- name: QuillJS Payload
66+
method: POST
67+
path:
68+
- "{{BaseURL}}"
69+
headers:
70+
Content-Type: application/json
71+
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0
72+
73+
attack: clusterbomb
74+
payloads:
75+
payload: "templates/dast/assets/5.2.1Payloads.txt"
76+
matchers:
77+
- type: word
78+
part: body
79+
words:
80+
- "{{payload}}"
81+
body: |
82+
{
83+
"ops": [
84+
{ "insert": "{{payload}}" },
85+
{ "insert": "{{payload}}", "attributes": { "bold": "{{payload}}" } },
86+
{ "insert": "{{payload}}", "attributes": { "italic": "{{payload}}" } },
87+
{ "insert": "{{payload}}", "attributes": { "link": "{{payload}}" } }
88+
]
89+
}

0 commit comments

Comments
 (0)