mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-01-31 15:53:33 +08:00
27 lines
661 B
YAML
27 lines
661 B
YAML
id: xss-serialize-javascript
|
|
|
|
info:
|
|
name: XSS Serialize Javascript
|
|
author: me_dheeraj (https://twitter.com/Dheerajmadhukar)
|
|
severity: info
|
|
description: Untrusted user input reaching `serialize-javascript` with `unsafe` attribute can cause Cross Site Scripting (XSS).
|
|
tags: file,nodejs,serialize,xss
|
|
|
|
file:
|
|
- extensions:
|
|
- all
|
|
|
|
matchers:
|
|
- type: regex
|
|
regex:
|
|
- "\\$S = require\\('serialize-javascript'\\)"
|
|
- "\\$S\\(..., {unsafe: true}\\)"
|
|
condition: or
|
|
|
|
- type: regex
|
|
negative: true
|
|
regex:
|
|
- "escape\\(...\\)"
|
|
- "encodeURI\\(...\\)"
|
|
condition: or
|