nuclei-templates/http/misconfiguration/missing-sri.yaml

43 lines
1.3 KiB
YAML
Raw Permalink Normal View History

id: missing-sri
2023-10-14 11:27:55 +00:00
info:
name: Missing Subresource Integrity
author: lucky0x0d,PulseSecurity.co.nz
severity: info
description: |
2023-10-14 11:27:55 +00:00
Checks if script tags within the HTML response have Subresource Integrity implemented via the integrity attribute
reference:
- https://cheatsheetseries.owasp.org/cheatsheets/Third_Party_Javascript_Management_Cheat_Sheet.html#subresource-integrity
metadata:
max-request: 1
2023-09-04 11:26:03 +00:00
tags: compliance,js,sri,misconfig
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
redirects: true
max-redirects: 5
2023-10-14 11:27:55 +00:00
matchers-condition: and
matchers:
- type: xpath
part: body
xpath:
- "//script[contains(@src,'//') and not(contains(translate(@integrity,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'^sha'))]"
- type: word
words:
- "text/html"
part: header
extractors:
- type: xpath
attribute: src
xpath:
- "//script[contains(@src,'//') and not(contains(translate(@integrity,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'^sha'))]"
# digest: 4a0a0047304502200e29fdf3695b4eadfb362a6ec5332dff4696a4564e73a096a609363b81776126022100a0e6443350ecc806ce4da1a80d628339d3515f387129fc50651ee687b8265bb8:922c64590222798bb761d5b6d8e72950