Skip to content

Stripe Secret Key Disclosure

ID: stripe-secret-key

Severity: high

Author: Ice3man

Tags: exposure,token,stripe

id: stripe-secret-key
info:
name: Stripe Secret Key Disclosure
author: Ice3man
severity: high
metadata:
max-request: 2
verified: true
tags: exposure,token,stripe
flow: http(1) && http(2)
http:
- method: GET
path:
- "{{BaseURL}}"
matchers:
- type: regex
part: body
name: token
regex:
- 'sk_(?:live|test)_[0-9a-zA-Z]{24}'
internal: true
- raw:
- |
@Host: https://api.stripe.com:443
GET /v1/charges?limit=1 HTTP/1.1
Host: api.stripe.com
Authorization: Bearer {{token}}
disable-path-automerge: true
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains(body, "billing_details") && contains(body, "balance_transaction")'
condition: and
extractors:
- type: dsl
dsl:
- token
# digest: 4b0a004830460221009c6a1b454ed1ab1ea7c7c916a8a6efc3933a0ac4b44d0d61fad0f5d79966487f0221008ce12822e619eac8364e33b193e2b97a3db1874862f22bd4243748107dd0e7a4:922c64590222798bb761d5b6d8e72950

This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.

Terminal window
$ nuclei -u "URL" -t "http/exposures/tokens/stripe/stripe-secret-key.yaml"

View on Github