springboot-x-application-context: Spring Boot `X-Application-Context` Header Exposure

2026-01-24 springboot x application context PoC Public

Description

Detected the presence of the X-Application-Context header in HTTP responses, which can expose sensitive application context information.

PoC

id: springboot-x-application-context

info:
  name: Spring Boot `X-Application-Context` Header Exposure
  author: DhiyaneshDK
  severity: low
  description: |
    Detected the presence of the X-Application-Context header in HTTP responses, which can expose sensitive application context information.
  reference:
    - https://github.com/spring-projects/spring-boot/issues/1308
  metadata:
    verified: true
    max-request: 1
    shodan-query: "X-Application-Context"
  tags: springboot,misconfig,exposure,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: header
        words:
          - '^X-Application-Context:\s*\S.+$'

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: header
        group: 1
        regex:
          - '(?m)^X-Application-Context:\s*(\S.+)$'
# digest: 4a0a004730450221009426d2d8b86da606d24d3070bfcd9525684e96f359843c7f0b70dd43f397f3bf022049073ae1391a806da5c2b4855e2d670929674d2881c2ab2e47eb6c829c3a4ed0:922c64590222798bb761d5b6d8e72950

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

References

Related Vulnerabilities