HexBrain

Browse / CVEs / CVE-2021-24838

CVE-2021-24838· bologer / anycomment· CWE-601

WordPress AnyComment <0.3.5 - Open Redirect

mediumseverity
6.1CVSS score
2.3%likelihood of exploitation, next 30 days
84%of all CVEs are less likely
Readycheck to confirm it

WordPress AnyComment plugin before 0.3.5 contains an open redirect vulnerability via an API endpoint which passes user input via the redirect parameter to the wp_redirect() function without being validated. An attacker can redirect a user to a malicious site and possibly obtain sensitive information, modify data, and/or execute unauthorized operations.

Impact

An attacker can trick users into visiting a malicious website, leading to potential phishing attacks or the execution of other malicious activities.

Fix

Update to the latest version of WordPress AnyComment plugin (0.3.5 or higher) to fix the open redirect vulnerability.

How to confirm it

Send: GET {{BaseURL}}/wp-json/anycomment/v1/auth/wordpress?redirect=https://interact.sh ; GET {{BaseURL}}/wp-json/anycomment/v1/auth/wordpress?redirect=https://interact.sh?a=https://interact.sh
Positive when: matches in header /(?m)^(?:Location\s*?:\s*?)(?:https?:\/\/|\/\/|\/\\\\|\/\\)(?:[a-zA-Z0-9\-_\.@]*…/ AND status 302

Run it with nuclei: nuclei -id CVE-2021-24838 -u <target>

The full check
id: CVE-2021-24838

info:
  name: WordPress AnyComment <0.3.5 - Open Redirect
  author: noobexploiter
  severity: medium
  description: |
    WordPress AnyComment plugin before 0.3.5 contains an open redirect vulnerability via an API endpoint which passes user input via the redirect parameter to the wp_redirect() function without being validated. An attacker can redirect a user to a malicious site and possibly obtain sensitive information, modify data, and/or execute unauthorized operations.
  impact: |
    An attacker can trick users into visiting a malicious website, leading to potential phishing attacks or the execution of other malicious activities.
  remediation: |
    Update to the latest version of WordPress AnyComment plugin (0.3.5 or higher) to fix the open redirect vulnerability.
  reference:
    - https://wpscan.com/vulnerability/562e81ad-7422-4437-a5b4-fcab9379db82
    - https://nvd.nist.gov/vuln/detail/CVE-2021-24838
    - https://github.com/ARPSyndicate/cvemon
    - https://github.com/ARPSyndicate/kenzer-templates
  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
    cve-id: CVE-2021-24838
    cwe-id: CWE-601
    epss-score: 0.02335
    epss-percentile: 0.83714
    cpe: cpe:2.3:a:bologer:anycomment:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: bologer
    product: anycomment
    framework: wordpress
  tags: cve2021,cve,redirect,anycomment,wpscan,wordpress,wp-plugin,bologer,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-json/anycomment/v1/auth/wordpress?redirect=https://interact.sh"
      - "{{BaseURL}}/wp-json/anycomment/v1/auth/wordpress?redirect=https://interact.sh?a=https://interact.sh"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: regex
        part: header
        regex:
          - '(?m)^(?:Location\s*?:\s*?)(?:https?:\/\/|\/\/|\/\\\\|\/\\)(?:[a-zA-Z0-9\-_\.@]*)interact\.sh\/?(\/|[^.].*)?$' # https://regex101.com/r/L403F0/1

      - type: status
        status:
          - 302

References

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