2021-03-10 08:33:40 +00:00
|
|
|
id: prototype-pollution-check
|
|
|
|
|
|
|
|
info:
|
|
|
|
name: Prototype Pollution Check
|
2021-04-06 06:46:11 +00:00
|
|
|
author: pdteam
|
2021-03-10 08:33:40 +00:00
|
|
|
severity: medium
|
2023-10-31 10:54:20 +00:00
|
|
|
metadata:
|
|
|
|
max-request: 4
|
2021-03-10 08:33:40 +00:00
|
|
|
tags: headless
|
|
|
|
headless:
|
|
|
|
- steps:
|
2023-01-09 16:13:13 +00:00
|
|
|
- args:
|
|
|
|
url: "{{BaseURL}}?constructor[prototype][vulnerableprop]=polluted#constructor[prototype][vulnerableprop]=polluted"
|
|
|
|
action: navigate
|
|
|
|
|
|
|
|
- action: waitload
|
|
|
|
|
2021-03-10 08:33:40 +00:00
|
|
|
- action: script
|
2023-01-09 16:13:13 +00:00
|
|
|
name: extract
|
2021-03-10 08:33:40 +00:00
|
|
|
args:
|
|
|
|
code: |
|
2022-07-28 11:21:08 +00:00
|
|
|
() => {
|
2023-01-09 16:13:13 +00:00
|
|
|
return window.vulnerableprop
|
|
|
|
}
|
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
part: extract
|
|
|
|
words:
|
|
|
|
- "polluted"
|
2023-10-14 11:27:55 +00:00
|
|
|
|
2023-01-09 16:13:13 +00:00
|
|
|
- steps:
|
|
|
|
- args:
|
|
|
|
url: "{{BaseURL}}?constructor.prototype.vulnerableprop=polluted#constructor.prototype.vulnerableprop=polluted"
|
|
|
|
action: navigate
|
2021-03-10 08:33:40 +00:00
|
|
|
|
2023-01-09 16:13:13 +00:00
|
|
|
- action: waitload
|
2021-03-10 08:33:40 +00:00
|
|
|
|
2023-01-09 16:13:13 +00:00
|
|
|
- action: script
|
|
|
|
name: extract2
|
|
|
|
args:
|
|
|
|
code: |
|
|
|
|
() => {
|
|
|
|
return window.vulnerableprop
|
|
|
|
}
|
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
part: extract2
|
|
|
|
words:
|
|
|
|
- "polluted"
|
2021-03-10 08:33:40 +00:00
|
|
|
|
2023-01-09 16:13:13 +00:00
|
|
|
- steps:
|
2021-03-10 08:33:40 +00:00
|
|
|
- args:
|
2023-01-09 16:13:13 +00:00
|
|
|
url: "{{BaseURL}}?__proto__[vulnerableprop]=polluted#__proto__.vulnerableprop=polluted&__proto__[vulnerableprop]=polluted"
|
2021-03-10 08:33:40 +00:00
|
|
|
action: navigate
|
2023-01-09 16:13:13 +00:00
|
|
|
|
2021-03-10 08:33:40 +00:00
|
|
|
- action: waitload
|
2022-08-29 09:10:50 +00:00
|
|
|
|
2021-03-10 08:33:40 +00:00
|
|
|
- action: script
|
2023-01-09 16:13:13 +00:00
|
|
|
name: extract3
|
2021-03-10 08:33:40 +00:00
|
|
|
args:
|
2022-08-29 09:10:50 +00:00
|
|
|
code: |
|
2023-01-09 16:13:13 +00:00
|
|
|
() => {
|
|
|
|
return window.vulnerableprop
|
|
|
|
}
|
2021-03-10 08:33:40 +00:00
|
|
|
matchers:
|
|
|
|
- type: word
|
2023-01-09 16:13:13 +00:00
|
|
|
part: extract3
|
2021-03-10 08:33:40 +00:00
|
|
|
words:
|
2023-01-09 16:13:13 +00:00
|
|
|
- "polluted"
|
2023-10-14 11:27:55 +00:00
|
|
|
|
2023-01-09 16:13:13 +00:00
|
|
|
- steps:
|
|
|
|
- args:
|
|
|
|
url: "{{BaseURL}}?__proto__.vulnerableprop=polluted"
|
|
|
|
action: navigate
|
2022-08-29 09:10:50 +00:00
|
|
|
|
2023-01-09 16:13:13 +00:00
|
|
|
- action: waitload
|
|
|
|
|
|
|
|
- action: script
|
|
|
|
name: extract4
|
|
|
|
args:
|
|
|
|
code: |
|
|
|
|
() => {
|
|
|
|
return window.vulnerableprop
|
|
|
|
}
|
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
part: extract4
|
|
|
|
words:
|
|
|
|
- "polluted"
|
2023-10-31 11:40:15 +00:00
|
|
|
|
|
|
|
# digest: 4b0a00483046022100b0180dde262d6546d4eaa2137bba9863bfae06d159d696ecee48335c5687e985022100ffa00bb4141f83c8ee22c5f25bad437dfe42db333565fa6c1285b3d29fae723e:922c64590222798bb761d5b6d8e72950
|