id: sharepoint-sitepages-disclosure

info:
  name: Microsoft SharePoint - Site Pages Disclosure
  author: pussycat0x
  severity: low
  description: |
    Microsoft SharePoint Site Pages library (/SitePages/) is accessible without proper authentication, exposing site content, page structure, and potentially sensitive information. The Site Pages library contains modern SharePoint pages (.aspx files)
  reference:
    - https://learn.microsoft.com/en-us/sharepoint/dev/general-development/work-with-site-pages
    - https://support.microsoft.com/en-us/office/site-pages-library
    - https://learn.microsoft.com/en-us/sharepoint/dev/features/site-pages-overview
  metadata:
    verified: true
    vendor: microsoft
    product: sharepoint
    fofa-query: app="Microsoft-SharePoint"
    shodan-query: cpe:"cpe:2.3:a:microsoft:sharepoint_server"
  tags: sharepoint,microsoft,disclosure,sitepages,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}/SitePages/Forms/AllPages.aspx"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_all(body, "Site Contents","Libraries","accessible mode")'
        condition: and
# digest: 4a0a00473045022100fa6a3ab7a4ab54d8c2b13ceb3e395501d9ed57207d0dc27b6afd57729d1dbf580220105b79bd874efd91eff72e94ca40c9ad172661aa42a58f01746e3bc30172725d:922c64590222798bb761d5b6d8e72950