id: wp-gtranslate-open-redirect

info:
  name: GTranslate < 2.8.11 - Open Redirect
  author: DhiyaneshDk,ritikchaddha
  severity: medium
  description: |
    The Translate WordPress with GTranslate WordPress plugin was affected by an Unauthenticated Open Redirect security vulnerability.
  impact: |
    Allows attackers to redirect to the malicious site.
  remediation: |
    Update GTranslate plugin to the fixed version 2.8.11
  reference:
    - https://wpscan.com/vulnerability/d4da110e-4351-49b8-b7a1-8be24895d2fa/
  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
    cwe-id: CWE-601
    cpe: cpe:2.3:a:gtranslate:gtranslate:*:*:*:*:*:wordpress:*:*
  metadata:
    max-request: 1
    vendor: gtranslate
    product: gtranslate
    framework: wordpress
    fofa-query: body="/wp-content/plugins/gtranslate"
  tags: wordpress,wp,wp-plugin,gtranslate,redirect,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/gtranslate/url_addon/gtranslate.php?glang=en&gurl=/oast.me"

    matchers:
      - type: regex
        part: header
        regex:
          - '(?m)^(?:Location\s*?:\s*?)(?:https?:\/\/|\/\/|\/\\\\|\/\\)?(?:[a-zA-Z0-9\-_\.@]*)oast\.me\/?(\/|[^.].*)?$'
# digest: 4a0a0047304502206a92fa09b0d942701c656ef37e92d4cc1dde55ea54b61b48442b815e928a0509022100cb3f15c358fa872893c9a5098985ea10c0b95f4fbf7a6571fefffc319617175f:922c64590222798bb761d5b6d8e72950