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

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: 4a0a00473045022100a21949d28c479094cbed17e4431431ee1bf6d364c69c49c9b367cacd26087d7602204c89daa6b6b8e37a8cc18bff58aef3f13d5cb91c2712c0ec372f43ef00806d2d:922c64590222798bb761d5b6d8e72950