forked from projectdiscovery/nuclei-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoogle-gemini-key-exposure.yaml
More file actions
37 lines (32 loc) · 917 Bytes
/
google-gemini-key-exposure.yaml
File metadata and controls
37 lines (32 loc) · 917 Bytes
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
id: google-gemini-key-exposure
info:
name: Google Gemini API Key - Exposure
author: Mestizo
severity: high
description: |
Detects exposed Google API keys and verifies access to the Gemini Files API endpoint. Exploitation can result in unauthorized data exposure, quota exhaustion, and potential financial loss.
metadata:
max-request: 2
verified: true
tags: exposure,google,apikey,gemini
http:
- method: GET
path:
- "{{BaseURL}}"
extractors:
- type: regex
name: google_api_key
part: body
regex:
- 'AIza[0-9A-Za-z\-_]{35}'
internal: true
- method: GET
path:
- "https://generativelanguage.googleapis.com/v1beta/files?key={{google_api_key}}"
matchers:
- type: dsl
dsl:
- "status_code == 200"
- '!contains(body, "error")'
- '!status_code == 403'
condition: and