netlify-headers-config-exposure: Netlify Headers Configuration - Exporsure

2026-01-16 Netlify PoC Public

Description

Detected publicly accessible Netlify configuration files such as _headers, headers, or netlify.toml. Exposure of these files may disclose security header settings, routing rules, authentication mechanisms, or other sensitive deployment information.

PoC

id: netlify-headers-config-exposure

info:
  name: Netlify Headers Configuration - Exporsure
  author: theamanrawat
  severity: low
  description: |
    Detected publicly accessible Netlify configuration files such as _headers, headers, or netlify.toml. Exposure of these files may disclose security header settings, routing rules, authentication mechanisms, or other sensitive deployment information.
  reference:
    - https://docs.netlify.com/routing/headers/
    - https://docs.netlify.com/configure-builds/file-based-configuration/
  metadata:
    verified: true
    max-request: 3
    fofa-query: 'header="netlify"'
  tags: netlify,config,exposure,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/_headers"
      - "{{BaseURL}}/headers"
      - "{{BaseURL}}/netlify.toml"

    stop-at-first-match: true
    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_all(body, "[build]", "[[redirects]]") || contains_any(body, "X-Frame-Options", "X-XSS-Protection", "Content-Security-Policy", "X-Content-Type-Options", "Access-Control-Allow-Origin", "Strict-Transport-Security", "Cache-Control", "Basic-Auth")'
          - '!(contains(to_lower(body), "<html") || contains(body, "<!doctype") || contains(body, "page not found"))'
        condition: and
# digest: 4a0a00473045022051df5739e530b530aa87b4bdd1762286ff8400c3a7d9d3f1947c5a9e6076647f02210098f7d35e5167f74f136ce6107963d5b648cd3191fbfbd87bc45f155364234837:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities