HexBrain

Browse / CVEs / CVE-2017-14725

CVE-2017-14725· wordpress / wordpress· CWE-601

WordPress < 4.8.2 - Authenticated Open Redirect

mediumseverity
5.4CVSS score
2.2%likelihood of exploitation, next 30 days
83%of all CVEs are less likely
Readycheck to confirm it

WordPress versions before 4.8.2 contain an open redirect caused by improper validation in wp-admin/edit-tag-form.php and wp-admin/user-edit.php, letting attackers redirect users to malicious sites, exploit requires access to admin interface.

Impact

Attackers can redirect authenticated users to malicious sites, potentially leading to phishing or malware distribution.

Fix

Update to WordPress 4.8.2 or later.

How to confirm it

Send: POST /wp-login.php
Positive when: status_code == 302 and contains(header, "wordpress_logged_in")
Send: GET /wp-admin/term.php?taxonomy=category&tag_ID=1&wp_http_referer=https%3A%2F%2Foast.pro
Positive when: status_code == 200 and contains(body, '_wpnonce')
Send: POST /wp-admin/edit-tags.php
Positive when: status_code == 302 and contains(header, 'wp_http_referer=https')
Send: GET /wp-admin/term.php?taxonomy=category&tag_ID=1&wp_http_referer=https%3A%2F%2Foast.pro&message=3
Positive when: status_code == 200 and contains(body, "href=\"https://oast.pro\"") and contains(body, "Back to Categories")

Run it with nuclei: nuclei -id CVE-2017-14725 -u <target>

The full check
id: CVE-2017-14725

info:
  name: WordPress < 4.8.2 - Authenticated Open Redirect
  author: 0x_Akoko
  severity: medium
  description: |
    WordPress versions before 4.8.2 contain an open redirect caused by improper validation in wp-admin/edit-tag-form.php and wp-admin/user-edit.php, letting attackers redirect users to malicious sites, exploit requires access to admin interface.
  impact: |
    Attackers can redirect authenticated users to malicious sites, potentially leading to phishing or malware distribution.
  remediation: |
    Update to WordPress 4.8.2 or later.
  reference:
    - https://wordpress.org/news/2017/09/wordpress-4-8-2-security-and-maintenance-release/
    - https://core.trac.wordpress.org/changeset/41398
    - https://nvd.nist.gov/vuln/detail/CVE-2017-14725
    - http://www.securitytracker.com/id/1039553
    - https://www.debian.org/security/2017/dsa-3997
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 5.4
    cve-id: CVE-2017-14725
    cwe-id: CWE-601
    epss-score: 0.02187
    epss-percentile: 0.82564
    cpe: cpe:2.3:a:wordpress:wordpress:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 5
    vendor: wordpress
    product: wordpress
    shodan-query:
      - http.component:"wordpress"
      - cpe:"cpe:2.3:a:wordpress:wordpress"
    fofa-query: body="oembed" && body="wp-"
  tags: cve,cve2017,wpscan,wordpress,redirect,authenticated,vuln

flow: http(1) && http(2) && http(3) && http(4)

http:
  - raw:
      - |
        POST /wp-login.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        log={{username}}&pwd={{password}}&wp-submit=Log+In

    matchers:
      - type: dsl
        dsl:
          - status_code == 302
          - contains(header, "wordpress_logged_in")
        condition: and
        internal: true

  - raw:
      - |
        GET /wp-admin/term.php?taxonomy=category&tag_ID=1&wp_http_referer=https%3A%2F%2Foast.pro HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - status_code == 200
          - contains(body, '_wpnonce')
        condition: and
        internal: true

    extractors:
      - type: regex
        name: nonce
        group: 1
        internal: true
        regex:
          - 'id="_wpnonce" name="_wpnonce" value="([a-f0-9]+)"'

  - raw:
      - |
        POST /wp-admin/edit-tags.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        action=editedtag&tag_ID=1&taxonomy=category&_wpnonce={{nonce}}&_wp_http_referer=%2Fwp-admin%2Fterm.php%3Ftaxonomy%3Dcategory%26tag_ID%3D1%26wp_http_referer%3Dhttps%253A%252F%252Foast.pro&name=Uncategorized&slug=uncategorized&parent=-1&description=

    matchers:
      - type: dsl
        dsl:
          - status_code == 302
          - contains(header, 'wp_http_referer=https')
        condition: and
        internal: true

  - raw:
      - |
        GET /wp-admin/term.php?taxonomy=category&tag_ID=1&wp_http_referer=https%3A%2F%2Foast.pro&message=3 HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - status_code == 200
          - contains(body, "href=\"https://oast.pro\"")
          - contains(body, "Back to Categories")
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from