id: sonarqube-projects-disclosure

info:
  name: SonarQube - Information Disclosure
  author: DhiyaneshDk
  severity: medium
  description: |
    Information leakage vulnerability in an interface of SonarQube, you can download the source code through the tool.
  reference:
    - https://github.com/PeiQi0/PeiQi-WIKI-Book/blob/main/docs/wiki/webapp/SonarQube/SonarQube%20search_projects%20%E9%A1%B9%E7%9B%AE%E4%BF%A1%E6%81%AF%E6%B3%84%E9%9C%B2%E6%BC%8F%E6%B4%9E.md
    - https://github.com/deletescape/sloot
  classification:
    cpe: cpe:2.3:a:sonarsource:sonarqube:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: sonarsource
    product: sonarqube
    shodan-query: title:"Sonarqube"
    fofa-query: app="sonarQube-代码管理"
  tags: sonarqube,exposure,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/api/components/search_projects"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"visibility":"public"'
          - '{"organization'
        condition: and

      - type: word
        part: header
        words:
          - 'application/json'

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100bfd162d6a7858490ab23861538e4d07147075083cfb901c87d6436b2f3bf1372022100824dc9b6ee9ca856928d7cd93d468c7c24a64cd86839d8219655715636692a28:922c64590222798bb761d5b6d8e72950